Module: kamailio
Branch: master
Commit: 743a9d33dcc3a6220bba217c14810dafb53355b2
URL:
https://github.com/kamailio/kamailio/commit/743a9d33dcc3a6220bba217c14810da…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2021-12-08T09:21:53+01:00
src/Makefile.defs: link -lrt if glibc <= 2.17
- GH #2921
---
Modified: src/Makefile.defs
---
Diff:
https://github.com/kamailio/kamailio/commit/743a9d33dcc3a6220bba217c14810da…
Patch:
https://github.com/kamailio/kamailio/commit/743a9d33dcc3a6220bba217c14810da…
---
diff --git a/src/Makefile.defs b/src/Makefile.defs
index cde1faa6df..8fab3fd812 100644
--- a/src/Makefile.defs
+++ b/src/Makefile.defs
@@ -1888,6 +1888,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)