summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSami Kerola <kerolasa@iki.fi>2018-10-29 20:02:38 +0000
committerSami Kerola <kerolasa@iki.fi>2018-11-11 10:37:06 +0000
commit01cb777d8a3b64dd754297e477f4eb7051392d40 (patch)
treedff4b0f48a380d1c5eb4240717ac54267dae6e80
parent04752839ae65f04d6deadb4ea398ac9905c117df (diff)
downloadiputils-01cb777d8a3b64dd754297e477f4eb7051392d40.tar.gz
build-sys: arping rarely needs -lrt linking
Old glibc did not have clock_gettime() that was part of librt, but since glibc 2.17 (December 2012), the library linking -rt is no longer required. Signed-off-by: Sami Kerola <kerolasa@iki.fi>
-rw-r--r--meson.build6
1 files changed, 5 insertions, 1 deletions
diff --git a/meson.build b/meson.build
index f8f6e9b..f0be5f0 100644
--- a/meson.build
+++ b/meson.build
@@ -45,7 +45,11 @@ endif
m_dep = cc.find_library('m')
resolv_dep = cc.find_library('resolv')
-rt_dep = cc.find_library('rt')
+if cc.has_function('clock_gettime')
+ rt_dep = cc.find_library('disabler-appears-to-disable-executable-build', required : false)
+else
+ rt_dep = cc.find_library('rt')
+endif
opt = get_option('USE_CAP')
if opt == true