Explorar el Código

Merge branch '0.2' of https://github.com/open62541/open62541 into 0.2

ichrispa hace 8 años
padre
commit
14f3ea9f4d
Se han modificado 2 ficheros con 11 adiciones y 5 borrados
  1. 5 2
      plugins/ua_network_tcp.c
  2. 6 3
      plugins/ua_network_udp.c

+ 5 - 2
plugins/ua_network_tcp.c

@@ -42,9 +42,12 @@
 # ifdef __QNX__
 #  include <sys/socket.h>
 # endif
-# ifdef __OpenBSD__
-#  include <sys/socket.h>
+#if defined(__unix__) || (defined(__APPLE__) && defined(__MACH__))
+# include <sys/param.h>
+# if defined(BSD)
+#  include<sys/socket.h>
 # endif
+#endif
 # ifndef __CYGWIN__
 #  include <netinet/tcp.h>
 # endif

+ 6 - 3
plugins/ua_network_udp.c

@@ -24,9 +24,12 @@
 #ifdef __QNX__
 #include <sys/socket.h>
 #endif
-#ifdef __OpenBSD__
-#include <sys/socket.h>
-#endif 
+#if defined(__unix__) || (defined(__APPLE__) && defined(__MACH__))
+# include <sys/param.h>
+# if defined(BSD)
+#  include<sys/socket.h>
+# endif
+#endif
 # define CLOSESOCKET(S) close(S)
 
 #define MAXBACKLOG 100