From: Andreas Schneider Date: Mon, 23 Sep 2019 15:04:57 +0000 (+0200) Subject: third_party: Only link cmocka against librt if really needed X-Git-Url: http://git.samba.org/samba.git/?a=commitdiff_plain;h=36e8d715bc8dc1e8466f5a5c9798df76310b7572;p=amitay%2Fsamba.git third_party: Only link cmocka against librt if really needed cmocka also uses clock_gettime(). BUG: https://bugzilla.samba.org/show_bug.cgi?id=14140 Signed-off-by: Andreas Schneider Signed-off-by: Isaac Boukris Pair-Programmed-With: Isaac Boukris Reviewed-by: Matthias Dieter Wallnöfer Reviewed-by: Alexander Bokovoy --- diff --git a/third_party/cmocka/wscript b/third_party/cmocka/wscript index 9ebdd7cfbe9..3c2ad50801a 100644 --- a/third_party/cmocka/wscript +++ b/third_party/cmocka/wscript @@ -12,8 +12,13 @@ def build(bld): if bld.CONFIG_SET('USING_SYSTEM_CMOCKA'): return + extra_libs='' + + # Link to librt if needed for clock_gettime() + if bld.CONFIG_SET('HAVE_LIBRT'): extra_libs += ' rt' + bld.SAMBA_LIBRARY('cmocka', source='cmocka.c', - deps='rt', + deps=extra_libs, allow_warnings=True, private_library=True)