ソースを参照

adding QNX support, credit goes to @tpiat, relates to #339

Stasik0 9 年 前
コミット
db4a39cbab
共有3 個のファイルを変更した8 個の追加0 個の削除を含む
  1. 3 0
      examples/networklayer_tcp.c
  2. 3 0
      examples/networklayer_udp.c
  3. 2 0
      include/ua_config.h.in

+ 3 - 0
examples/networklayer_tcp.c

@@ -23,6 +23,9 @@
 # include <netdb.h> //gethostbyname for the client
 # include <unistd.h> // read, write, close
 # include <arpa/inet.h>
+#ifdef __QNX__
+#include <sys/socket.h>
+#endif
 # define CLOSESOCKET(S) close(S)
 #endif
 

+ 3 - 0
examples/networklayer_udp.c

@@ -24,6 +24,9 @@
 # include <sys/ioctl.h>
 # include <unistd.h> // read, write, close
 # include <arpa/inet.h>
+#ifdef __QNX__
+#include <sys/socket.h>
+#endif
 # define CLOSESOCKET(S) close(S)
 
 #define MAXBACKLOG 100

+ 2 - 0
include/ua_config.h.in

@@ -33,7 +33,9 @@
 
 /* Endianness */
 #if defined(__linux__) || defined(__APPLE__)
+#  ifndef __QNX__
 # include <endian.h>
+#  endif
 # if ( __BYTE_ORDER != __LITTLE_ENDIAN )
 #  define UA_NON_LITTLEENDIAN_ARCHITECTURE
 # endif