浏览代码

db_mysql: fixed build on Solaris

- Added preporcessor defs to avoid adding macro which breaks compile on Solaris
Jason Penton 14 年之前
父节点
当前提交
3298a44890
共有 1 个文件被更改,包括 4 次插入1 次删除
  1. 4 1
      modules/db_mysql/my_cmd.c

+ 4 - 1
modules/db_mysql/my_cmd.c

@@ -30,7 +30,10 @@
  *  @{
  */
 
-#define _XOPEN_SOURCE 4     /* bsd */
+/* the following macro will break the compile on solaris */
+#if !defined (__SVR4) && !defined (__sun)
+   #define _XOPEN_SOURCE 4     /* bsd */
+#endif
 #define _XOPEN_SOURCE_EXTENDED 1    /* solaris */
 #define _SVID_SOURCE 1 /* timegm */