Module: kamailio Branch: master Commit: bca9768b6f2667bad8472fa99a113b8249ca0f9a URL: https://github.com/kamailio/kamailio/commit/bca9768b6f2667bad8472fa99a113b82...
Author: Greg Troxel gdt@lexort.com Committer: Greg Troxel gdt@lexort.com Date: 2020-03-18T19:06:36-04:00
Makefile.defs: Only add -ldl on systems that use it
kamailio uses dlopen, and on some systems, one must link with -ldl. On others, this is not needed and there is no libdl. For now, simply omit -ldl on NetBSD (which doesn't have or require it), and don't try to change behavior on other systems.
---
Modified: src/Makefile.defs
---
Diff: https://github.com/kamailio/kamailio/commit/bca9768b6f2667bad8472fa99a113b82... Patch: https://github.com/kamailio/kamailio/commit/bca9768b6f2667bad8472fa99a113b82...
---
diff --git a/src/Makefile.defs b/src/Makefile.defs index 3d28f3ef38..f6f39e3a01 100644 --- a/src/Makefile.defs +++ b/src/Makefile.defs @@ -210,9 +210,18 @@ endif
endif
+# dlopen requires -ldl on some systems, but not others. Until there +# is clarity on which require -ldl, add just enough ifeq to fix +# systems known not to use it. +ifeq ($(OS), netbsd) +LIBDL="" +else +LIBDL="-ldl" +endif + ifeq ($(LIBSSL_SET_MUTEX_SHARED), 1) CC_PMUTEX_OPTS = -pthread -DKSR_PTHREAD_MUTEX_SHARED -LD_PMUTEX_OPTS = -pthread -rdynamic -ldl -Wl,-Bsymbolic-functions +LD_PMUTEX_OPTS = -pthread -rdynamic $(LIBDL) -Wl,-Bsymbolic-functions else CC_PMUTEX_OPTS = LD_PMUTEX_OPTS =