Browse Source

getting server compiled with multithreading and amalgamation

Stasik0 9 years ago
parent
commit
2107446310
1 changed files with 6 additions and 4 deletions
  1. 6 4
      examples/server.c

+ 6 - 4
examples/server.c

@@ -24,11 +24,13 @@
 # include <unistd.h> //access
 #endif
 
-#ifndef __USE_XOPEN2K
-#define __USE_XOPEN2K
 #ifdef UA_MULTITHREADING
-# include <pthread.h>
-#endif
+# ifdef UA_NO_AMALGAMATION
+#  ifndef __USE_XOPEN2K
+#   define __USE_XOPEN2K
+#  endif
+# endif
+#include <pthread.h>
 #endif
 /****************************/
 /* Server-related variables */