[sr-dev] git:master: db_mysql: fixed build on Solaris

Jason Penton jason.penton at gmail.com
Sat Jul 16 11:13:27 CEST 2011


Module: sip-router
Branch: master
Commit: 3298a44890f62191eb46251cf93579b366331c6b
URL:    http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=3298a44890f62191eb46251cf93579b366331c6b

Author: Jason Penton <jason.penton at gmail.com>
Committer: Jason Penton <jason.penton at gmail.com>
Date:   Sat Jul 16 10:13:14 2011 +0200

db_mysql: fixed build on Solaris

- Added preporcessor defs to avoid adding macro which breaks compile on Solaris

---

 modules/db_mysql/my_cmd.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/modules/db_mysql/my_cmd.c b/modules/db_mysql/my_cmd.c
index 00a75ce..2e71131 100644
--- a/modules/db_mysql/my_cmd.c
+++ b/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 */
 




More information about the sr-dev mailing list