Browse Source

Precompiler directives to include sys/socket on OpenBSD.

Markus Klingenberger# 8 years ago
parent
commit
ceb27d614e
2 changed files with 6 additions and 0 deletions
  1. 3 0
      plugins/ua_network_tcp.c
  2. 3 0
      plugins/ua_network_udp.c

+ 3 - 0
plugins/ua_network_tcp.c

@@ -42,6 +42,9 @@
 # ifdef __QNX__
 # ifdef __QNX__
 #  include <sys/socket.h>
 #  include <sys/socket.h>
 # endif
 # endif
+# ifdef __OpenBSD__
+#  include <sys/socket.h>
+# endif
 # ifndef __CYGWIN__
 # ifndef __CYGWIN__
 #  include <netinet/tcp.h>
 #  include <netinet/tcp.h>
 # endif
 # endif

+ 3 - 0
plugins/ua_network_udp.c

@@ -24,6 +24,9 @@
 #ifdef __QNX__
 #ifdef __QNX__
 #include <sys/socket.h>
 #include <sys/socket.h>
 #endif
 #endif
+#ifdef __OpenBSD__
+#include <sys/socket.h>
+#endif 
 # define CLOSESOCKET(S) close(S)
 # define CLOSESOCKET(S) close(S)
 
 
 #define MAXBACKLOG 100
 #define MAXBACKLOG 100