Browse code

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

Daniel-Constantin Mierla authored on 13/12/2021 08:29:06
Showing 1 changed files
... ...
@@ -1890,7 +1890,7 @@ ifeq ($(OS), linux)
1890 1890
 	endif
1891 1891
 	ifeq ($(CC_NAME), gcc)
1892 1892
 		# link librt for glibc <= 2.17
1893
-		GLIBCVER:=$(shell ldd --version | head -1 | awk '{ sub(/\./, "", $NF); print $NF }' )
1893
+		GLIBCVER=$(shell ldd --version | head -1 | sed -e 's/^.* //' -e 's/\.//' )
1894 1894
 		ifeq ($(shell [ $(GLIBCVER) -le 217 ] && echo librt), librt)
1895 1895
 			LIBS+=-lrt
1896 1896
 		endif