[IOMultiplexerV2] cross platform compatibility fixes
[NextIRCd.git] / src / IOHandler / IOSockets.c
index 2db06f93a43caa25c742c45bc3dccc672215548a..480d1ba39ae9bfecd10c2e79707eadd35137b31e 100644 (file)
@@ -32,6 +32,7 @@
 #include <netinet/ip.h> 
 #include <arpa/inet.h>
 #include <unistd.h>
+#include <fcntl.h>
 #endif
 #include "compat/inet.h"
 #include <stdio.h>
@@ -466,7 +467,7 @@ static void iosocket_prepare_fd(int sockfd) {
                fcntl_flags = fcntl(sockfd, F_GETFD);
                fcntl(sockfd, F_SETFD, fcntl_flags|FD_CLOEXEC);
        }
-       #else
+       #elif defined(FIONBIO)
        {
                unsigned long ulong = 1;
                ioctlsocket(sockfd, FIONBIO, &ulong);