Link with -lrt to support ancient libc
authorNikolaus Rath <Nikolaus@rath.org>
Mon, 25 Sep 2017 09:23:38 +0000 (10:23 +0100)
committerNikolaus Rath <Nikolaus@rath.org>
Mon, 25 Sep 2017 09:23:38 +0000 (10:23 +0100)
Fixes: #207.
lib/meson.build

index 2379d9f27af9103c704c1a7ca6223a0a5da41fff..0a742caa13f2dd1ab7970e5d34f514531adced24 100644 (file)
@@ -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'))