WAF: Fix detection of IPv6
authorLukas Slebodnik <lslebodn@redhat.com>
Tue, 6 Dec 2016 17:07:50 +0000 (18:07 +0100)
committerRalph Boehme <slow@samba.org>
Mon, 2 Jan 2017 17:03:20 +0000 (18:03 +0100)
Detection of IPv6 failed with strict CFLAGS due to missing
header file.

  Checking for HAVE_IPV6       : not found

../test.c: In function ‘main’:
../test.c:226:34: error: implicit declaration of function
    ‘if_nametoindex’ [-Werror=implicit-function-declaration]
                        int idx = if_nametoindex("iface1");
                                  ^~~~~~~~~~~~~~

Signed-off-by: Lukas Slebodnik <lslebodn@redhat.com>
Reviewed-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Autobuild-User(master): Ralph Böhme <slow@samba.org>
Autobuild-Date(master): Mon Jan  2 18:03:20 CET 2017 on sn-devel-144

lib/replace/wscript

index 1dfd90293ea6835a22510242e063bf3d2a20d263..ea0d5d09b895a7a119eb783f803ff5b9019e37df 100644 (file)
@@ -189,7 +189,7 @@ def configure(conf):
                        ''',
                     define='HAVE_IPV6',
                     lib='nsl socket',
-                    headers='sys/socket.h netdb.h netinet/in.h')
+                    headers='sys/socket.h netdb.h netinet/in.h net/if.h')
 
     if conf.CONFIG_SET('HAVE_SYS_UCONTEXT_H') and conf.CONFIG_SET('HAVE_SIGNAL_H'):
         conf.CHECK_CODE('''