mirror of
https://github.com/status-im/miniupnp.git
synced 2025-02-20 17:58:19 +00:00
linux: add -lrt when building for glibc < 2.17
This commit is contained in:
parent
a2cec1d868
commit
ac796a4077
@ -163,6 +163,14 @@ else
|
||||
$(info please install uuid-dev package / libuuid)
|
||||
endif # ($(TEST),1)
|
||||
|
||||
GLIBC_VERSION := $(shell ldd --version | head -n 1 | sed 's/^.* //')
|
||||
GLIBC_VERSION_MAJOR = $(shell echo $(GLIBC_VERSION) | cut -f 1 -d . )
|
||||
GLIBC_VERSION_MINOR = $(shell echo $(GLIBC_VERSION) | cut -f 2 -d . )
|
||||
# clock_gettime() needs -lrt when glibc version < 2.17
|
||||
LDLIBS += $(shell if [ $(GLIBC_VERSION_MAJOR) -lt 2 ] \
|
||||
|| [ \( $(GLIBC_VERSION_MAJOR) -eq 2 \) -a \( $(GLIBC_VERSION_MINOR) -lt 17 \) ] ; \
|
||||
then echo "-lrt" ; fi )
|
||||
|
||||
TESTUPNPDESCGENOBJS = testupnpdescgen.o upnpdescgen.o
|
||||
|
||||
EXECUTABLES = miniupnpd testupnpdescgen testgetifstats \
|
||||
|
Loading…
x
Reference in New Issue
Block a user