>From 741a4ec2f96f8b8df3afe35337c435afb244a17b Mon Sep 17 00:00:00 2001 From: Douglas Bagnall Date: Tue, 8 Mar 2016 10:23:09 +1300 Subject: [PATCH] configure: set HAVE___ATTRIBUTE__ for heimdal Without this, heimdal ends up defining __attribute__ away, causing gcc-6 compile errors with -Werror=return-type because it can't tell when functions have __attribute__((noreturn)). Signed-off-by: Douglas Bagnall --- buildtools/wafsamba/wscript | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/buildtools/wafsamba/wscript b/buildtools/wafsamba/wscript index 586cc4b..8802e5a 100755 --- a/buildtools/wafsamba/wscript +++ b/buildtools/wafsamba/wscript @@ -402,6 +402,22 @@ def configure(conf): addmain=False, msg='Checking for library destructor support') + conf.CHECK_CODE(''' + void test_attribute(void) __attribute__ (()); + + void test_attribute(void) + { + return; + } + + int main(void) { + return 0; + } + ''', + 'HAVE___ATTRIBUTE__', + addmain=False, + msg='Checking for __attribute__') + if sys.platform.startswith('aix'): conf.DEFINE('_ALL_SOURCE', 1, add_to_cflags=True) # Might not be needed if ALL_SOURCE is defined -- 2.5.0