Browse Source

Try fixes to CI

Jose Cabral 6 years ago
parent
commit
09d211c8a5
3 changed files with 10 additions and 22 deletions
  1. 1 1
      arch/posix/ua_architecture.h
  2. 2 2
      arch/ua_network_tcp.c
  3. 7 19
      arch/win32/ua_architecture.h

+ 1 - 1
arch/posix/ua_architecture.h

@@ -11,7 +11,7 @@
 #define PLUGINS_ARCH_POSIX_UA_ARCHITECTURE_H_
 
 /* Enable POSIX features */
-#if !defined(_XOPEN_SOURCE) && !defined(_WRS_KERNEL)
+#if !defined(_XOPEN_SOURCE)
 # define _XOPEN_SOURCE 600
 #endif
 #ifndef _DEFAULT_SOURCE

+ 2 - 2
arch/ua_network_tcp.c

@@ -373,14 +373,14 @@ setFDSet(ServerNetworkLayerTCP *layer, fd_set *fdset) {
     UA_Int32 highestfd = 0;
     for(UA_UInt16 i = 0; i < layer->serverSocketsSize; i++) {
         UA_fd_set(layer->serverSockets[i], fdset);
-        if(layer->serverSockets[i] > highestfd)
+        if((UA_Int32)layer->serverSockets[i] > highestfd)
             highestfd = (UA_Int32)layer->serverSockets[i];
     }
 
     ConnectionEntry *e;
     LIST_FOREACH(e, &layer->connections, pointers) {
         UA_fd_set(e->connection.sockfd, fdset);
-        if(e->connection.sockfd > highestfd)
+        if((UA_Int32)e->connection.sockfd > highestfd)
             highestfd = (UA_Int32)e->connection.sockfd;
     }
 

+ 7 - 19
arch/win32/ua_architecture.h

@@ -24,16 +24,9 @@
 # undef WINVER
 # undef _WIN32_WINDOWS
 # undef _WIN32_WINNT
-# define WINVER 0x0501
-# define _WIN32_WINDOWS 0x0501
-# define _WIN32_WINNT 0x0501
-#endif
-
-/* Backup definition of SLIST_ENTRY on mingw winnt.h */
-#ifdef SLIST_ENTRY
-# pragma push_macro("SLIST_ENTRY")
-# undef SLIST_ENTRY
-# define POP_SLIST_ENTRY
+# define WINVER 0x0600
+# define _WIN32_WINDOWS 0x0600
+# define _WIN32_WINNT 0x0600 //windows vista version, which included InepPton
 #endif
 
 /* Thread-Local Storage
@@ -52,11 +45,6 @@
 # define UA_THREAD_LOCAL
 #endif
 
-#ifdef _WIN32_WINNT
-#undef _WIN32_WINNT
-#endif
-#define _WIN32_WINNT 0x0600 //windows vista version, which included InepPton
-
 #include <stdlib.h>
 #if defined(_WIN32) && !defined(__clang__)
 # include <malloc.h>
@@ -78,11 +66,11 @@
 # define UA_access access
 #endif
 
-#ifdef POP_SLIST_ENTRY
+/*#ifdef POP_SLIST_ENTRY
 # undef SLIST_ENTRY
 # undef POP_SLIST_ENTRY
 # pragma pop_macro("SLIST_ENTRY")
-#endif
+#endif*/
 
 #define ssize_t int
 #define OPTVAL_TYPE char
@@ -144,11 +132,11 @@ void UA_sleep_ms(size_t ms);
 #define UA_inet_pton InetPton
 
 #if UA_IPV6
-# include <Iphlpapi.h>
+# include <iphlpapi.h>
 # define UA_if_nametoindex if_nametoindex
 #endif
 
-#ifdef maxStringLength //defined in mingw32
+#ifdef maxStringLength //defined in mingw64
 # undef maxStringLength
 #endif