[sr-dev] git:master: srdb1: fix for undeclared INADDR_LOOPBACK on darwin os

Daniel-Constantin Mierla miconda at gmail.com
Mon Sep 5 14:16:43 CEST 2011


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

Author: Daniel-Constantin Mierla <miconda at gmail.com>
Committer: Daniel-Constantin Mierla <miconda at gmail.com>
Date:   Mon Sep  5 14:14:54 2011 +0200

srdb1: fix for undeclared INADDR_LOOPBACK on darwin os

---

 lib/srdb1/db_ut.c |   12 ++++++++++--
 1 files changed, 10 insertions(+), 2 deletions(-)

diff --git a/lib/srdb1/db_ut.c b/lib/srdb1/db_ut.c
index 80aa4c7..0331896 100644
--- a/lib/srdb1/db_ut.c
+++ b/lib/srdb1/db_ut.c
@@ -31,6 +31,10 @@
  */
 
 
+#ifdef __OS_darwin
+#include "../../pvar.h"
+#endif
+
 /**
  * make strptime available
  * use 600 for 'Single UNIX Specification, Version 3'
@@ -47,8 +51,12 @@
 
 #include <time.h>
 
-#undef _XOPEN_SOURCE
-#undef _XOPEN_SOURCE_EXTENDED
+#ifndef __OS_solaris
+	#undef _XOPEN_SOURCE
+	#undef _XOPEN_SOURCE_EXTENDED
+#else
+	#undef _XOPEN_SOURCE_EXTENDED 1   /* solaris */
+#endif
 
 #include <limits.h>
 #include <errno.h>




More information about the sr-dev mailing list