diff options
author | Sami Kerola <kerolasa@iki.fi> | 2018-10-29 20:02:38 +0000 |
---|---|---|
committer | Sami Kerola <kerolasa@iki.fi> | 2018-11-11 10:37:06 +0000 |
commit | 01cb777d8a3b64dd754297e477f4eb7051392d40 (patch) | |
tree | dff4b0f48a380d1c5eb4240717ac54267dae6e80 | |
parent | 04752839ae65f04d6deadb4ea398ac9905c117df (diff) | |
download | iputils-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.build | 6 |
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 |