瀏覽代碼

getting server compiled with multithreading and amalgamation

Stasik0 9 年之前
父節點
當前提交
2107446310
共有 1 個文件被更改,包括 6 次插入4 次删除
  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 */