[sr-dev] git:5.5:17bbfe97: Makefile.defs: use sed instead of awk for detecting glibc version
Daniel-Constantin Mierla
miconda at gmail.com
Thu Dec 16 09:28:08 CET 2021
Module: kamailio
Branch: 5.5
Commit: 17bbfe97179a2965b145b946b76ba458c2af8bd5
URL: https://github.com/kamailio/kamailio/commit/17bbfe97179a2965b145b946b76ba458c2af8bd5
Author: Daniel-Constantin Mierla <miconda at gmail.com>
Committer: Daniel-Constantin Mierla <miconda at gmail.com>
Date: 2021-12-16T08:30:33+01:00
Makefile.defs: use sed instead of awk for detecting glibc version
(cherry picked from commit 225a59475c91e154ce0a7f0ec252be841a5a8ce5)
---
Modified: src/Makefile.defs
---
Diff: https://github.com/kamailio/kamailio/commit/17bbfe97179a2965b145b946b76ba458c2af8bd5.diff
Patch: https://github.com/kamailio/kamailio/commit/17bbfe97179a2965b145b946b76ba458c2af8bd5.patch
---
diff --git a/src/Makefile.defs b/src/Makefile.defs
index ab3d6b7e27..3793705039 100644
--- a/src/Makefile.defs
+++ b/src/Makefile.defs
@@ -1888,7 +1888,7 @@ ifeq ($(OS), linux)
endif
ifeq ($(CC_NAME), gcc)
# link librt for glibc <= 2.17
- GLIBCVER:=$(shell ldd --version | head -1 | awk '{ sub(/\./, "", $NF); print $NF }' )
+ GLIBCVER=$(shell ldd --version | head -1 | sed -e 's/^.* //' -e 's/\.//' )
ifeq ($(shell [ $(GLIBCVER) -le 217 ] && echo librt), librt)
LIBS+=-lrt
endif
More information about the sr-dev
mailing list