瀏覽代碼

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