[sr-dev] git:master:9852f751: modules/presence_conference: re-organize preprocessor symbols

Mikko Lehto mslehto at iki.fi
Mon May 23 11:23:44 CEST 2016


Module: kamailio
Branch: master
Commit: 9852f751edb99b5190f16ffe68c62eb0f51f85bc
URL: https://github.com/kamailio/kamailio/commit/9852f751edb99b5190f16ffe68c62eb0f51f85bc

Author: Mikko Lehto <mslehto at iki.fi>
Committer: Mikko Lehto <mslehto at iki.fi>
Date: 2016-05-22T03:23:24+03:00

modules/presence_conference: re-organize preprocessor symbols

Fixes compilation on FreeBSD where no special feature request is needed

---

Modified: modules/presence_conference/pidf.c

---

Diff:  https://github.com/kamailio/kamailio/commit/9852f751edb99b5190f16ffe68c62eb0f51f85bc.diff
Patch: https://github.com/kamailio/kamailio/commit/9852f751edb99b5190f16ffe68c62eb0f51f85bc.patch

---

diff --git a/modules/presence_conference/pidf.c b/modules/presence_conference/pidf.c
index 1f64e14..f33943f 100644
--- a/modules/presence_conference/pidf.c
+++ b/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>




More information about the sr-dev mailing list