From b1a743c8eb8a5d665beb5675b5ba4ae66ffe8243 Mon Sep 17 00:00:00 2001 From: Nikolaus Rath Date: Mon, 25 Sep 2017 10:23:38 +0100 Subject: Link with -lrt to support ancient libc Fixes: #207. --- lib/meson.build | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'lib') diff --git a/lib/meson.build b/lib/meson.build index 2379d9f..0a742ca 100644 --- a/lib/meson.build +++ b/lib/meson.build @@ -14,7 +14,7 @@ if cfg.get('HAVE_ICONV') endif deps = [ thread_dep ] -libdl = meson.get_compiler('c').find_library('dl', required: false) +libdl = cc.find_library('dl', required: false) if libdl.found() deps += [ libdl ] endif @@ -22,6 +22,9 @@ endif if host_machine.system().startswith('netbsd') deps += [ cc.find_library('perfuse'), cc.find_library('puffs') ] +else + # Required for clock_gettime before glibc 2.17 + deps += cc.find_library('rt') endif fusermount_path = join_paths(get_option('prefix'), get_option('bindir')) -- cgit v1.2.3