From f4c0a750d4adebcf2342a44e85f04526c34268c8 Mon Sep 17 00:00:00 2001 From: Lukas Slebodnik Date: Tue, 6 Dec 2016 18:07:36 +0100 Subject: [PATCH] WAF: Fix detection of linker features MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Following check of linker feature failed with strict CFLAGS "-Werrorr=implicit-function-declaration -Werror=implicit-int" Checking for rpath library support : not found Checking for -Wl,--version-script support : not found ../main.c: In function ‘main’: ../main.c:1:26: error: implicit declaration of function ‘lib_func’ [-Werror=implicit-function-declaration] int main(void) {return !(lib_func() == 42);} ^~~~~~~~ Signed-off-by: Lukas Slebodnik Reviewed-by: Andreas Schneider Reviewed-by: Ralph Boehme --- buildtools/wafsamba/samba_conftests.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/buildtools/wafsamba/samba_conftests.py b/buildtools/wafsamba/samba_conftests.py index 045f858e9cd..c9f8fdc0131 100644 --- a/buildtools/wafsamba/samba_conftests.py +++ b/buildtools/wafsamba/samba_conftests.py @@ -286,7 +286,9 @@ def CHECK_LIBRARY_SUPPORT(conf, rpath=False, version_script=False, msg=None): os.makedirs(subdir) Utils.writef(os.path.join(subdir, 'lib1.c'), 'int lib_func(void) { return 42; }\n') - Utils.writef(os.path.join(dir, 'main.c'), 'int main(void) {return !(lib_func() == 42);}\n') + Utils.writef(os.path.join(dir, 'main.c'), + 'int lib_func(void);\n' + 'int main(void) {return !(lib_func() == 42);}\n') bld = Build.BuildContext() bld.log = conf.log -- 2.34.1