From: Guus Sliepen Date: Fri, 11 Dec 2009 21:24:07 +0000 (+0100) Subject: Only call ioctlsocket() on Windows. X-Git-Tag: release-1.1pre1~100 X-Git-Url: https://tinc-vpn.org/git/browse?a=commitdiff_plain;h=fec14791e869180bb7994ca38ca7006cc2e957fb;p=tinc Only call ioctlsocket() on Windows. --- diff --git a/src/tincctl.c b/src/tincctl.c index 8a07dfa0..2d2e2f25 100644 --- a/src/tincctl.c +++ b/src/tincctl.c @@ -436,11 +436,13 @@ int main(int argc, char *argv[], char *envp[]) { return 1; } +#ifdef HAVE_MINGW unsigned long arg = 0; if(ioctlsocket(fd, FIONBIO, &arg) != 0) { fprintf(stderr, "ioctlsocket failed: %s", sockstrerror(sockerrno)); } +#endif if(connect(fd, (struct sockaddr *)&addr, sizeof addr) < 0) {