Browse Source

- fix conflicting swap definition during solaris compilation
- the _XOPEN_SOURCE causes a definition of swap in unistd.h and stdlib.h
- based on opensips change r4622 from Bogdan
- thanks to Muhammad Akl for access to a debugging machine


git-svn-id: https://openser.svn.sourceforge.net/svnroot/openser/trunk@5159 689a6050-402a-0410-94f2-e92a70836424

Henning Westerholt 17 years ago
parent
commit
1b53cbd590
1 changed files with 6 additions and 2 deletions
  1. 6 2
      lib/srdb1/db_ut.h

+ 6 - 2
lib/srdb1/db_ut.h

@@ -41,9 +41,13 @@
 /**
  * make strptime available
  * use 600 for 'Single UNIX Specification, Version 3'
+ * _XOPEN_SOURCE creates conflict in swab definition in Solaris
  */
-#define _XOPEN_SOURCE 600          /* glibc2 on linux, bsd */
-#define _XOPEN_SOURCE_EXTENDED 1   /* solaris */
+#ifndef __OS_solaris
+	#define _XOPEN_SOURCE 600          /* glibc2 on linux, bsd */
+#else
+	#define _XOPEN_SOURCE_EXTENDED 1   /* solaris */
+#endif
 
 #include <time.h>