Make sure the 1.1 branch compiles in a MinGW environment.
UNIX domain sockets, of course, don't exist on Windows. For now, when compiling tinc in a MinGW environment, try to use a TCP socket bound to localhost as an alternative.
This commit is contained in:
parent
08615e420b
commit
075264a9e1
7 changed files with 95 additions and 25 deletions
12
src/tincd.c
12
src/tincd.c
|
|
@ -345,6 +345,13 @@ int main(int argc, char **argv) {
|
|||
return 0;
|
||||
}
|
||||
|
||||
#ifdef HAVE_MINGW
|
||||
if(WSAStartup(MAKEWORD(2, 2), &wsa_state)) {
|
||||
logger(LOG_ERR, "System call `%s' failed: %s", "WSAStartup", winerror(GetLastError()));
|
||||
return 1;
|
||||
}
|
||||
#endif
|
||||
|
||||
openlogger("tinc", use_logfile?LOGMODE_FILE:LOGMODE_STDERR);
|
||||
|
||||
if(!event_init()) {
|
||||
|
|
@ -373,11 +380,6 @@ int main(int argc, char **argv) {
|
|||
}
|
||||
|
||||
#ifdef HAVE_MINGW
|
||||
if(WSAStartup(MAKEWORD(2, 2), &wsa_state)) {
|
||||
logger(LOG_ERR, "System call `%s' failed: %s", "WSAStartup", winerror(GetLastError()));
|
||||
return 1;
|
||||
}
|
||||
|
||||
if(!do_detach || !init_service())
|
||||
return main2(argc, argv);
|
||||
else
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue