X-Git-Url: https://tinc-vpn.org/git/browse?p=tinc;a=blobdiff_plain;f=src%2Ftincd.c;h=4b303622bedff7fbd21a0f4f36fe2109a9843a38;hp=d2179ab1cdaa440bdbfeb32792471fea1c6e1f9c;hb=9c2d5d9f9212dee5ee988f4824e5e4afedb7a2dd;hpb=0e945413315c9d15a3eb013fa3731dd978a8c7b8 diff --git a/src/tincd.c b/src/tincd.c index d2179ab1..4b303622 100644 --- a/src/tincd.c +++ b/src/tincd.c @@ -17,7 +17,7 @@ along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - $Id: tincd.c,v 1.10.4.77 2003/07/28 22:06:09 guus Exp $ + $Id: tincd.c,v 1.10.4.79 2003/07/30 11:50:45 guus Exp $ */ #include "system.h" @@ -38,6 +38,8 @@ #include +#include + #include "conf.h" #include "logger.h" #include "net.h" @@ -93,6 +95,10 @@ static struct option const long_options[] = { {NULL, 0, NULL, 0} }; +#ifdef HAVE_MINGW +static struct WSAData wsa_state; +#endif + static void usage(bool status) { if(status) @@ -417,6 +423,13 @@ int main(int argc, char **argv, char **envp) exit(1); } +#ifdef HAVE_MINGW + if(WSAStartup(MAKEWORD(2, 2), &wsa_state)) { + logger(LOG_ERR, _("System call `%s' failed: %s"), "WSAStartup", strerror(errno)); + exit(1); + } +#endif + if(!detach()) exit(1);