[sr-dev] git:master:225a5947: Makefile.defs: use sed instead of awk for detecting glibc version

Daniel-Constantin Mierla miconda at gmail.com
Mon Dec 13 09:29:52 CET 2021


Module: kamailio
Branch: master
Commit: 225a59475c91e154ce0a7f0ec252be841a5a8ce5
URL: https://github.com/kamailio/kamailio/commit/225a59475c91e154ce0a7f0ec252be841a5a8ce5

Author: Daniel-Constantin Mierla <miconda at gmail.com>
Committer: Daniel-Constantin Mierla <miconda at gmail.com>
Date: 2021-12-13T09:29:06+01:00

Makefile.defs: use sed instead of awk for detecting glibc version

---

Modified: src/Makefile.defs

---

Diff:  https://github.com/kamailio/kamailio/commit/225a59475c91e154ce0a7f0ec252be841a5a8ce5.diff
Patch: https://github.com/kamailio/kamailio/commit/225a59475c91e154ce0a7f0ec252be841a5a8ce5.patch

---

diff --git a/src/Makefile.defs b/src/Makefile.defs
index 8fab3fd812..57bccfe725 100644
--- a/src/Makefile.defs
+++ b/src/Makefile.defs
@@ -1890,7 +1890,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