[IOMultiplexerV2] cross platform compatibility fixes
authorpk910 <philipp@zoelle1.de>
Mon, 3 Mar 2014 18:14:10 +0000 (19:14 +0100)
committerpk910 <philipp@zoelle1.de>
Mon, 3 Mar 2014 18:16:41 +0000 (19:16 +0100)
src/IOHandler/IODNSEngine_default.c
src/IOHandler/IOSockets.c

index 43f6b12ff17e2e46a4e928d3f43df6ef2471088f..b9f37641fe7f5e571ee58ecf4c6686dfe54e3d78 100644 (file)
@@ -29,6 +29,7 @@
 #include <sys/types.h>
 #include <sys/socket.h>
 #include <netdb.h>
+#include <arpa/inet.h>
 #endif
 #include "compat/inet.h"
 #include <stdlib.h>
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);