build: added IPV6 test
authorAndrew Tridgell <tridge@samba.org>
Sun, 7 Mar 2010 12:31:48 +0000 (23:31 +1100)
committerAndrew Tridgell <tridge@samba.org>
Tue, 6 Apr 2010 10:26:45 +0000 (20:26 +1000)
lib/replace/wscript

index 9e10cd9904eae28e85650d4b402529dd2f81ac41..05bf1ea06b4df2477dc3473e560c13d34a586b9a 100644 (file)
@@ -112,6 +112,20 @@ def configure(conf):
 
     conf.CHECK_TYPE_IN('sig_atomic_t', 'signal.h', define='HAVE_SIG_ATOMIC_T_TYPE')
 
+    conf.CHECK_CODE('''
+                       struct sockaddr_storage sa_store;
+                       struct addrinfo *ai = NULL;
+                       struct in6_addr in6addr;
+                       int idx = if_nametoindex("iface1");
+                       int s = socket(AF_INET6, SOCK_STREAM, 0);
+                       int ret = getaddrinfo(NULL, NULL, NULL, &ai);
+                       if (ret != 0) {
+                         const char *es = gai_strerror(ret);
+                       }
+                       freeaddrinfo(ai);
+                       ''',
+                    define='HAVE_IPV6')
+
 
     conf.CHECK_FUNCS('shl_load shl_unload shl_findsym')
     conf.CHECK_FUNCS('pipe strftime srandom random srand rand usleep setbuffer')