Skip to content

Commit

Permalink
configure: set HAVE___ATTRIBUTE__ for heimdal
Browse files Browse the repository at this point in the history
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 <[email protected]>
Reviewed-by: Andrew Bartlett <[email protected]>
Reviewed-by: Garming Sam <[email protected]>

Autobuild-User(master): Andrew Bartlett <[email protected]>
Autobuild-Date(master): Wed Mar  9 13:52:26 CET 2016 on sn-devel-144
  • Loading branch information
douglasbagnall authored and abartlet committed Mar 9, 2016
1 parent c1b68fa commit 1c79654
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions buildtools/wafsamba/wscript
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 1c79654

Please sign in to comment.