Browse Source

ims modules: don't link with -lrt on macosx

- define MAXINT on mac os x
Daniel-Constantin Mierla 12 years ago
parent
commit
539f97bdaa

+ 5 - 1
modules/icscf/Makefile

@@ -13,7 +13,11 @@ LIBS=
 DEFS += -DOPENSER_MOD_INTERFACE
 DEFS += -DOPENSER_MOD_INTERFACE
 
 
 DEFS += -I/usr/include/libxml2
 DEFS += -I/usr/include/libxml2
-LIBS += -L$(LOCALBASE)/lib -lxml2 -lrt
+LIBS += -L$(LOCALBASE)/lib -lxml2
+
+ifneq ($(OS),darwin)
+	LIBS += -lrt
+endif
 
 
 
 
 SERLIBPATH=../../lib
 SERLIBPATH=../../lib

+ 8 - 1
modules/icscf/scscf_list.h

@@ -49,14 +49,21 @@
 #include "../../sr_module.h"
 #include "../../sr_module.h"
 #include "../../modules/tm/tm_load.h"
 #include "../../modules/tm/tm_load.h"
 #include "mod.h"
 #include "mod.h"
+#ifndef __OS_darwin
 #include <values.h>
 #include <values.h>
-
+#endif
 #include "../../mem/shm_mem.h"
 #include "../../mem/shm_mem.h"
 
 
 #include "../../dset.h"
 #include "../../dset.h"
 
 
 #include "../../timer.h"
 #include "../../timer.h"
 
 
+#ifdef __OS_darwin
+#ifndef MAXINT
+#define MAXINT INT_MAX
+#endif
+#endif
+
 
 
 /** S-CSCF list element */ 
 /** S-CSCF list element */ 
 typedef struct _scscf_entry {
 typedef struct _scscf_entry {

+ 5 - 1
modules/isc/Makefile

@@ -12,7 +12,11 @@ LIBS=
 DEFS += -DOPENSER_MOD_INTERFACE
 DEFS += -DOPENSER_MOD_INTERFACE
 
 
 DEFS += -I/usr/include/libxml2
 DEFS += -I/usr/include/libxml2
-LIBS += -L$(LOCALBASE)/lib -lxml2 -lrt
+LIBS += -L$(LOCALBASE)/lib -lxml2
+
+ifneq ($(OS),darwin)
+	LIBS += -lrt
+endif
 
 
 SERLIBPATH=../../lib
 SERLIBPATH=../../lib
 SER_LIBS+=$(SERLIBPATH)/ims/kamailio_ims
 SER_LIBS+=$(SERLIBPATH)/ims/kamailio_ims

+ 5 - 1
modules/registrar_pcscf/Makefile

@@ -12,7 +12,11 @@ LIBS=
 
 
 DEFS+=-DOPENSER_MOD_INTERFACE -I/usr/include/libxml2 -I$(LOCALBASE)/include/libxml2
 DEFS+=-DOPENSER_MOD_INTERFACE -I/usr/include/libxml2 -I$(LOCALBASE)/include/libxml2
 
 
-LIBS += -L$(LOCALBASE)/lib -lrt
+LIBS += -L$(LOCALBASE)/lib
+
+ifneq ($(OS),darwin)
+	LIBS += -lrt
+endif
 
 
 SERLIBPATH=../../lib
 SERLIBPATH=../../lib
 SER_LIBS+=$(SERLIBPATH)/kcore/kcore
 SER_LIBS+=$(SERLIBPATH)/kcore/kcore

+ 5 - 1
modules/registrar_scscf/Makefile

@@ -12,7 +12,11 @@ LIBS=
 
 
 DEFS+=-DOPENSER_MOD_INTERFACE
 DEFS+=-DOPENSER_MOD_INTERFACE
 DEFS += -I/usr/include/libxml2 
 DEFS += -I/usr/include/libxml2 
-LIBS += -L$(LOCALBASE)/lib -lxml2 -lrt
+LIBS += -L$(LOCALBASE)/lib -lxml2
+
+ifneq ($(OS),darwin)
+	LIBS += -lrt
+endif
 
 
 SERLIBPATH=../../lib
 SERLIBPATH=../../lib
 SER_LIBS+=$(SERLIBPATH)/kcore/kcore
 SER_LIBS+=$(SERLIBPATH)/kcore/kcore