Module: kamailio
Branch: 5.5
Commit: 0afcccdc46950c5b4a49024e2092ab712ba6be94
URL:
https://github.com/kamailio/kamailio/commit/0afcccdc46950c5b4a49024e2092ab7…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2021-12-16T08:27:31+01:00
src/Makefile.defs: link -lrt if glibc <= 2.17
- GH #2921
(cherry picked from commit 743a9d33dcc3a6220bba217c14810dafb53355b2)
---
Modified: src/Makefile.defs
---
Diff:
https://github.com/kamailio/kamailio/commit/0afcccdc46950c5b4a49024e2092ab7…
Patch:
https://github.com/kamailio/kamailio/commit/0afcccdc46950c5b4a49024e2092ab7…
---
diff --git a/src/Makefile.defs b/src/Makefile.defs
index 82b8751e2e..ab3d6b7e27 100644
--- a/src/Makefile.defs
+++ b/src/Makefile.defs
@@ -1886,6 +1886,13 @@ ifeq ($(OS), linux)
ifeq ($(NO_SELECT),)
C_DEFS+=-DHAVE_SELECT
endif
+ ifeq ($(CC_NAME), gcc)
+ # link librt for glibc <= 2.17
+ GLIBCVER:=$(shell ldd --version | head -1 | awk '{ sub(/\./, "", $NF);
print $NF }' )
+ ifeq ($(shell [ $(GLIBCVER) -le 217 ] && echo librt), librt)
+ LIBS+=-lrt
+ endif
+ endif
endif
ifeq ($(OS), gnu_kfreebsd)