X-Git-Url: https://www.tinc-vpn.org/git/browse?p=tinc;a=blobdiff_plain;f=src%2Ftincd.c;h=6b90de761c413c35e3800aee4f7e2045bd34a973;hp=d2179ab1cdaa440bdbfeb32792471fea1c6e1f9c;hb=721e4caee0f7c6e003c297c95fb6d93bd4102219;hpb=586f15ed20682413d1bddbb4518dd2714c96b255 diff --git a/src/tincd.c b/src/tincd.c index d2179ab1..6b90de76 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.78 2003/07/29 22:59:00 guus Exp $ */ #include "system.h" @@ -93,6 +93,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 +421,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);