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