aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJakub Jirutka <jakub@jirutka.cz>2021-10-31 21:25:02 +0100
committerJakub Jirutka <jakub@jirutka.cz>2021-11-03 00:35:51 +0100
commit64761a2c023a7e2325d5528cccbe1a260d1d0a4d (patch)
tree28ae76d3a10e366793b2f864845bf5d53a4b4783
parent0b2b1c5cdd6b8a2ec5c19e7500b372edb1fd3dcc (diff)
downloadaports-64761a2c023a7e2325d5528cccbe1a260d1d0a4d.tar.gz
aports-64761a2c023a7e2325d5528cccbe1a260d1d0a4d.tar.bz2
aports-64761a2c023a7e2325d5528cccbe1a260d1d0a4d.tar.xz
main/kamailio: fix incompatibility with OpenLDAP 2.5+
-rw-r--r--main/kamailio/APKBUILD2
-rw-r--r--main/kamailio/fix-openldap-2.5-symbol-conflict.patch46
2 files changed, 48 insertions, 0 deletions
diff --git a/main/kamailio/APKBUILD b/main/kamailio/APKBUILD
index 7a5fbb48b8..55066b0429 100644
--- a/main/kamailio/APKBUILD
+++ b/main/kamailio/APKBUILD
@@ -33,6 +33,7 @@ makedepends="bison flex freeradius-client-dev expat-dev
# These are in testing / community - can't enable for kamailio in main
# librdkafka-dev dnssec-tools-dev
source="kamailio-${pkgver}$_suffix.tar.gz::https://github.com/kamailio/kamailio/archive/$_gitcommit.tar.gz
+ fix-openldap-2.5-symbol-conflict.patch
kamailio.initd
"
@@ -556,5 +557,6 @@ sipdump() {
sha512sums="
5f887453c9c00acff855505d9b567c200242791686aeacb2477065136d5edcfc76c4cab55078d36e6b76294246343c412dd9959219f1eff57ffe239550de7a37 kamailio-5.5.2.tar.gz
+50d055c62fc9ba2248b5883e316d5f91930ef74906314cc9d2e3379168f0967173e5474c9915c81edb1174035f33f7fa570e80d99c9bd27aa9ef38c0b155a76c fix-openldap-2.5-symbol-conflict.patch
0c87bfb78481568c03e603049eb8597a90d24ae2941fc81694181b2326fa9db89fbddaaa3cf08c7bc2f5fa0e7ffac4cf4e2d010d08c4faa6cf6df98593432539 kamailio.initd
"
diff --git a/main/kamailio/fix-openldap-2.5-symbol-conflict.patch b/main/kamailio/fix-openldap-2.5-symbol-conflict.patch
new file mode 100644
index 0000000000..766616f31b
--- /dev/null
+++ b/main/kamailio/fix-openldap-2.5-symbol-conflict.patch
@@ -0,0 +1,46 @@
+From: Jakub Jirutka <jakub@jirutka.cz>
+Date: Sun, 31 Oct 2021 21:23:35 +0100
+Subject: [PATCH] Fix symbol conflict with OpenLDAP 2.5+
+
+ In file included from ldap_connect.c:34:
+ ldap_connect.h:34:12: error: conflicting types for 'ldap_connect'
+ 34 | extern int ldap_connect(char *_ld_name);
+ | ^~~~~~~~~~~~
+ In file included from ldap_connect.c:32:
+ /usr/include/ldap.h:1555:1: note: previous declaration of 'ldap_connect' was here
+ 1555 | ldap_connect( LDAP *ld );
+ | ^~~~~~~~~~~~
+
+--- a/src/modules/ldap/ldap_connect.c
++++ b/src/modules/ldap/ldap_connect.c
+@@ -185,7 +185,7 @@
+ return 0;
+ }
+
+-int ldap_connect(char *_ld_name)
++int kam_ldap_connect(char *_ld_name)
+ {
+ return ldap_connect_ex(_ld_name, L_DBG);
+ }
+--- a/src/modules/ldap/ldap_connect.h
++++ b/src/modules/ldap/ldap_connect.h
+@@ -31,7 +31,7 @@
+ #include "../../core/str.h"
+ #include "../../core/dprint.h"
+
+-extern int ldap_connect(char *_ld_name);
++extern int kam_ldap_connect(char *_ld_name);
+ extern int ldap_disconnect(char *_ld_name);
+ extern int ldap_reconnect(char *_ld_name);
+ extern int ldap_get_vendor_version(char **_version);
+--- a/src/modules/ldap/ldap_mod.c
++++ b/src/modules/ldap/ldap_mod.c
+@@ -167,7 +167,7 @@
+ return -1;
+ }
+
+- if(ldap_connect(ld_name) != 0) {
++ if(kam_ldap_connect(ld_name) != 0) {
+ LM_ERR("[%s]: failed to connect to LDAP host(s)\n", ld_name);
+ ldap_disconnect(ld_name);
+ return -1;