浏览代码

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

- define MAXINT on mac os x
Daniel-Constantin Mierla 12 年之前
父节点
当前提交
539f97bdaa
共有 5 个文件被更改,包括 28 次插入5 次删除
  1. 5 1
      modules/icscf/Makefile
  2. 8 1
      modules/icscf/scscf_list.h
  3. 5 1
      modules/isc/Makefile
  4. 5 1
      modules/registrar_pcscf/Makefile
  5. 5 1
      modules/registrar_scscf/Makefile

+ 5 - 1
modules/icscf/Makefile

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

+ 8 - 1
modules/icscf/scscf_list.h

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

+ 5 - 1
modules/isc/Makefile

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

+ 5 - 1
modules/registrar_scscf/Makefile

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