Module: kamailio
Branch: master
Commit: 0f3123426d3c9d8e10b8e74557d0791a6df85648
URL: 
https://github.com/kamailio/kamailio/commit/0f3123426d3c9d8e10b8e74557d0791a6df85648

Author: Daniel-Constantin Mierla <mico...@gmail.com>
Committer: Daniel-Constantin Mierla <mico...@gmail.com>
Date: 2016-10-15T18:47:38+02:00

Makefile.defs: option to disable raw sockets at compile time

make RAW_SOCKS=no ...

---

Modified: Makefile.defs

---

Diff:  
https://github.com/kamailio/kamailio/commit/0f3123426d3c9d8e10b8e74557d0791a6df85648.diff
Patch: 
https://github.com/kamailio/kamailio/commit/0f3123426d3c9d8e10b8e74557d0791a6df85648.patch

---

diff --git a/Makefile.defs b/Makefile.defs
index 715a13a..582fb38 100644
--- a/Makefile.defs
+++ b/Makefile.defs
@@ -89,6 +89,11 @@ endif
 WITHAS ?= 1
 # enable core hooks for SCTP
 SCTP ?= 1
+# enable raw sockets
+RAW_SOCKS ?= yes
+ifeq ($(RAW_SOCKS),1)
+       RAW_SOCKS = yes
+endif
 
 # what to install
 INSTALL_FLAVOUR=$(FLAVOUR)
@@ -1717,7 +1722,10 @@ ifeq ($(OS), linux)
        use_futex= yes
        C_DEFS+=-DHAVE_GETHOSTBYNAME2 -DHAVE_UNION_SEMUN -DHAVE_SCHED_YIELD \
                        -DHAVE_MSG_NOSIGNAL -DHAVE_MSGHDR_MSG_CONTROL 
-DHAVE_ALLOCA_H \
-                       -DHAVE_TIMEGM -DHAVE_SCHED_SETSCHEDULER -DUSE_RAW_SOCKS
+                       -DHAVE_TIMEGM -DHAVE_SCHED_SETSCHEDULER
+       ifneq ($(RAW_SOCKS), yes)
+               C_DEFS+= -DUSE_RAW_SOCKS
+       endif
        ifneq ($(found_lock_method), yes)
                #C_DEFS+= -DUSE_POSIX_SEM
                C_DEFS+=-DUSE_PTHREAD_MUTEX
@@ -1764,7 +1772,10 @@ ifeq ($(OS), gnu_kfreebsd)
        use_futex= yes
        C_DEFS+=-DHAVE_GETHOSTBYNAME2 -DHAVE_UNION_SEMUN -DHAVE_SCHED_YIELD \
                        -DHAVE_MSG_NOSIGNAL -DHAVE_MSGHDR_MSG_CONTROL 
-DHAVE_ALLOCA_H \
-                       -DHAVE_TIMEGM -DHAVE_SCHED_SETSCHEDULER -DUSE_RAW_SOCKS
+                       -DHAVE_TIMEGM -DHAVE_SCHED_SETSCHEDULER
+       ifneq ($(RAW_SOCKS), yes)
+               C_DEFS+= -DUSE_RAW_SOCKS
+       endif
        ifneq ($(found_lock_method), yes)
                #C_DEFS+= -DUSE_POSIX_SEM
                C_DEFS+=-DUSE_PTHREAD_MUTEX
@@ -1845,7 +1856,10 @@ ifeq ($(OS), freebsd)
        C_DEFS+=-DHAVE_SOCKADDR_SA_LEN -DHAVE_GETHOSTBYNAME2 -DHAVE_UNION_SEMUN 
\
                -DHAVE_SCHED_YIELD -DHAVE_MSGHDR_MSG_CONTROL \
                -DHAVE_CONNECT_ECONNRESET_BUG -DHAVE_TIMEGM \
-               -DHAVE_NETINET_IN_SYSTM -DUSE_RAW_SOCKS
+               -DHAVE_NETINET_IN_SYSTM
+       ifneq ($(RAW_SOCKS), yes)
+               C_DEFS+= -DUSE_RAW_SOCKS
+       endif
        ifneq ($(found_lock_method), yes)
                C_DEFS+= -DUSE_PTHREAD_MUTEX  # try pthread sems
                found_lock_method=yes


_______________________________________________
sr-dev mailing list
sr-dev@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev

Reply via email to