瀏覽代碼

Merge pull request #632 from mslehto/SUS

modules/presence_conference: Fix compilation on FreeBSD
Daniel-Constantin Mierla 9 年之前
父節點
當前提交
cae3953c57
共有 1 個文件被更改,包括 7 次插入9 次删除
  1. 7 9
      modules/presence_conference/pidf.c

+ 7 - 9
modules/presence_conference/pidf.c

@@ -34,24 +34,22 @@
 /**
  * make strptime available
  * use 600 for 'Single UNIX Specification, Version 3'
- * _XOPEN_SOURCE creates conflict in header definitions in Solaris
  */
-#ifndef __OS_solaris
-	#define _XOPEN_SOURCE 600          /* glibc2 on linux, bsd */
+#ifdef __OS_linux
+	#define _XOPEN_SOURCE 600          /* glibc2 on linux */
 	#define _BSD_SOURCE 1				/* needed on linux to "fix" the effect
 										  of the above define on
 										  features.h/unistd.h syscall() */
    #define _DEFAULT_SOURCE 1			/* _BSD_SOURCE is deprecated */
+#endif
+#ifdef __OS_darwin
    #define _DARWIN_C_SOURCE 1
-#else
-	#define _XOPEN_SOURCE_EXTENDED 1   /* solaris */
 #endif
-
+#ifdef __OS_solaris
+   #define _XOPEN_SOURCE_EXTENDED 1
+#endif
 #include <time.h>
 
-#undef _XOPEN_SOURCE
-#undef _XOPEN_SOURCE_EXTENDED
-
 #include <string.h>
 #include <stdlib.h>
 #include <libxml/parser.h>