diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/addns/dns.h | 4 | ||||
-rw-r--r-- | lib/addns/dnsutils.c | 20 | ||||
-rw-r--r-- | lib/addns/wscript | 3 | ||||
-rwxr-xr-x | lib/addns/wscript_build | 2 |
4 files changed, 10 insertions, 19 deletions
diff --git a/lib/addns/dns.h b/lib/addns/dns.h index 2864bdf539..c0820fe0bd 100644 --- a/lib/addns/dns.h +++ b/lib/addns/dns.h @@ -42,10 +42,6 @@ #include <time.h> #include <netdb.h> -#ifdef HAVE_UUID_UUID_H -#include <uuid/uuid.h> -#endif - #include <talloc.h> /******************************************************************* diff --git a/lib/addns/dnsutils.c b/lib/addns/dnsutils.c index 5a63c61f14..3eeb6ab9e2 100644 --- a/lib/addns/dnsutils.c +++ b/lib/addns/dnsutils.c @@ -22,12 +22,13 @@ License along with this library; if not, see <http://www.gnu.org/licenses/>. */ +#include "includes.h" +#include "librpc/ndr/libndr.h" +#include "librpc/gen_ndr/ndr_misc.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, @@ -137,17 +138,10 @@ char *dns_generate_keyname( TALLOC_CTX *mem_ctx ) char *result = NULL; #if defined(WITH_DNS_UPDATES) - uuid_t uuid; - - /* - * uuid_unparse gives 36 bytes plus '\0' - */ - if (!(result = talloc_array(mem_ctx, char, 37))) { - return NULL; - } + struct GUID guid; - uuid_generate( uuid ); - uuid_unparse( uuid, result ); + guid = GUID_random(); + result = GUID_string(mem_ctx, &guid); #endif diff --git a/lib/addns/wscript b/lib/addns/wscript index 99e9358a3d..83945bc1b4 100644 --- a/lib/addns/wscript +++ b/lib/addns/wscript @@ -3,4 +3,5 @@ import Options def configure(conf): - conf.CHECK_HEADERS('sys/uuid.h') + pass + #conf.CHECK_HEADERS('sys/uuid.h') diff --git a/lib/addns/wscript_build b/lib/addns/wscript_build index 513060d2f0..5fac61c50f 100755 --- a/lib/addns/wscript_build +++ b/lib/addns/wscript_build @@ -2,6 +2,6 @@ bld.SAMBA_LIBRARY('addns', source='dnsquery.c dnsrecord.c dnsutils.c dnssock.c dnsgss.c dnsmarshall.c error.c', - public_deps='dnshostsfile samba-util gssapi uuid resolv', + public_deps='dnshostsfile samba-util gssapi ndr resolv', private_library=True, vars=locals()) |