samba-waf18.patch 1.1 KB

123456789101112131415161718192021222324
  1. Avoid calling lib_func without a prototype.
  2. This commit mirrors the change in commit f4c0a750d4adebcf2342a44e85f04526c34
  3. ("WAF: Fix detection of linker features")
  4. to buildtools/wafsamba/samba_conftests.py. It fixes the check for rpath
  5. support with compilers in strict C99 mode.
  6. Submitted upstream: <https://gitlab.com/samba-team/samba/-/merge_requests/2807>
  7. diff --git a/buildtools/wafsamba/samba_waf18.py b/buildtools/wafsamba/samba_waf18.py
  8. index e2a078bd3a05fd78..cfdceea14ca4b706 100644
  9. --- a/buildtools/wafsamba/samba_waf18.py
  10. +++ b/buildtools/wafsamba/samba_waf18.py
  11. @@ -209,7 +209,8 @@ def CHECK_LIBRARY_SUPPORT(conf, rpath=False, version_script=False, msg=None):
  12. lib_node.parent.mkdir()
  13. lib_node.write('int lib_func(void) { return 42; }\n', 'w')
  14. main_node = bld.srcnode.make_node('main.c')
  15. - main_node.write('int main(void) {return !(lib_func() == 42);}', 'w')
  16. + main_node.write('int lib_func(void);\n'
  17. + 'int main(void) {return !(lib_func() == 42);}', 'w')
  18. linkflags = []
  19. if version_script:
  20. script = bld.srcnode.make_node('ldscript')