[sr-dev] git:master:bc783bef: lib/binrpc modules/ctl utils/kamcmd : set UNIX_PATH_MAX to lowest common value

Mikko Lehto mslehto at iki.fi
Thu Apr 28 22:21:59 CEST 2016


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

Author: Mikko Lehto <mslehto at iki.fi>
Committer: Mikko Lehto <mslehto at iki.fi>
Date: 2016-04-28T15:04:53+03:00

lib/binrpc modules/ctl utils/kamcmd : set UNIX_PATH_MAX to lowest common value

sockaddr_un.sun_path[] seem to be either 104 or 108 in following Unices:
104 - NetBSD, OpenBSD, FreeBSD, DragonFly BSD, MINIX, XNU(Apple OS X)
108 - illumos, Solaris, Linux

---

Modified: lib/binrpc/binrpc_api.c
Modified: modules/ctl/init_socks.c
Modified: utils/kamcmd/kamcmd.c

---

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

---

diff --git a/lib/binrpc/binrpc_api.c b/lib/binrpc/binrpc_api.c
index e67c589..9145758 100644
--- a/lib/binrpc/binrpc_api.c
+++ b/lib/binrpc/binrpc_api.c
@@ -53,7 +53,7 @@
 #define binrpc_free internal_free
 
 #ifndef UNIX_PATH_MAX
-#define UNIX_PATH_MAX 108
+#define UNIX_PATH_MAX 104
 #endif
 
 #ifndef INT2STR_MAX_LEN
diff --git a/modules/ctl/init_socks.c b/modules/ctl/init_socks.c
index 0bbaebc..29c67f9 100644
--- a/modules/ctl/init_socks.c
+++ b/modules/ctl/init_socks.c
@@ -37,7 +37,7 @@
 #include <fcntl.h>
 
 #ifndef UNIX_PATH_MAX
-#define UNIX_PATH_MAX 108
+#define UNIX_PATH_MAX 104
 #endif
 
 
diff --git a/utils/kamcmd/kamcmd.c b/utils/kamcmd/kamcmd.c
index 3381631..4211741 100644
--- a/utils/kamcmd/kamcmd.c
+++ b/utils/kamcmd/kamcmd.c
@@ -82,7 +82,7 @@
 
 
 #ifndef UNIX_PATH_MAX
-#define UNIX_PATH_MAX 100
+#define UNIX_PATH_MAX 104
 #endif
 
 static char id[]="$Id$";




More information about the sr-dev mailing list