addns: Fix the Solaris/Illumos build.
authorIra Cooper <ira@samba.org>
Wed, 7 Mar 2012 00:22:46 +0000 (19:22 -0500)
committerIra Cooper <ira@samba.org>
Wed, 7 Mar 2012 01:41:10 +0000 (20:41 -0500)
uuid_t is not defined without including sys/uuid.h, configure+waf checks added.

lib/addns/dnsutils.c
lib/addns/wscript [new file with mode: 0644]
source3/configure.in
wscript

index 43305a98730aa1451ba54ec5a754bd8b7ac39d94..5a63c61f149cb1bd3ef27189f53dc1a47d936f6e 100644 (file)
 #include "dns.h"
 #include <ctype.h>
 
 #include "dns.h"
 #include <ctype.h>
 
+#ifdef HAVE_SYS_UUID_H
+#include <sys/uuid.h>
+#endif
+
 static DNS_ERROR LabelList( TALLOC_CTX *mem_ctx,
                            const char *name,
                            struct dns_domain_label **presult )
 static DNS_ERROR LabelList( TALLOC_CTX *mem_ctx,
                            const char *name,
                            struct dns_domain_label **presult )
diff --git a/lib/addns/wscript b/lib/addns/wscript
new file mode 100644 (file)
index 0000000..99e9358
--- /dev/null
@@ -0,0 +1,6 @@
+#!/usr/bin/env python
+
+import Options
+
+def configure(conf):
+    conf.CHECK_HEADERS('sys/uuid.h')
index 8c069a09cfe0f060e5516d0b75e6ffdd77edf599..3736dcbedb50f3b5a4e52d1d47c57a8ac1b4adff 100644 (file)
@@ -749,6 +749,7 @@ AC_CHECK_HEADERS(langinfo.h locale.h)
 AC_CHECK_HEADERS(xfs/libxfs.h)
 AC_CHECK_HEADERS(netgroup.h)
 AC_CHECK_HEADERS(linux/falloc.h)
 AC_CHECK_HEADERS(xfs/libxfs.h)
 AC_CHECK_HEADERS(netgroup.h)
 AC_CHECK_HEADERS(linux/falloc.h)
+AC_CHECK_HEADERS(sys/uuid.h)
 
 AC_CHECK_HEADERS(rpcsvc/yp_prot.h,,,[[
 #if HAVE_RPC_RPC_H
 
 AC_CHECK_HEADERS(rpcsvc/yp_prot.h,,,[[
 #if HAVE_RPC_RPC_H
diff --git a/wscript b/wscript
index 5901f5af57520930cf7fa68289a83c26aca72a20..96df5632267400cae23fa6960ce256fa1b850272 100755 (executable)
--- a/wscript
+++ b/wscript
@@ -102,6 +102,7 @@ def configure(conf):
     conf.RECURSE('pidl')
     conf.RECURSE('selftest')
     conf.RECURSE('source3')
     conf.RECURSE('pidl')
     conf.RECURSE('selftest')
     conf.RECURSE('source3')
+    conf.RECURSE('lib/addns')
 
     conf.SAMBA_CHECK_UNDEFINED_SYMBOL_FLAGS()
 
 
     conf.SAMBA_CHECK_UNDEFINED_SYMBOL_FLAGS()