From 17bbfe97179a2965b145b946b76ba458c2af8bd5 Mon Sep 17 00:00:00 2001 From: Daniel-Constantin Mierla Date: Mon, 13 Dec 2021 09:29:06 +0100 Subject: [PATCH] Makefile.defs: use sed instead of awk for detecting glibc version (cherry picked from commit 225a59475c91e154ce0a7f0ec252be841a5a8ce5) --- src/Makefile.defs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Makefile.defs b/src/Makefile.defs index ab3d6b7e272..37937050396 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