Only call ioctlsocket() on Windows.

This commit is contained in:
Guus Sliepen 2009-12-11 22:24:07 +01:00
parent edebf579f2
commit fec14791e8

View file

@ -436,11 +436,13 @@ int main(int argc, char *argv[], char *envp[]) {
return 1; return 1;
} }
#ifdef HAVE_MINGW
unsigned long arg = 0; unsigned long arg = 0;
if(ioctlsocket(fd, FIONBIO, &arg) != 0) { if(ioctlsocket(fd, FIONBIO, &arg) != 0) {
fprintf(stderr, "ioctlsocket failed: %s", sockstrerror(sockerrno)); fprintf(stderr, "ioctlsocket failed: %s", sockstrerror(sockerrno));
} }
#endif
if(connect(fd, (struct sockaddr *)&addr, sizeof addr) < 0) { if(connect(fd, (struct sockaddr *)&addr, sizeof addr) < 0) {