From dbbcc2f07ea6955c6b0b5a719f8058c54b1d750c Mon Sep 17 00:00:00 2001 From: Alexander Bokovoy Date: Feb 14 2024 12:31:22 +0000 Subject: [PATCH 1/2] use BIND macros when defining DNS names Fixes: https://pagure.io/bind-dyndb-ldap/issue/228 Signed-off-by: Alexander Bokovoy --- diff --git a/src/mldap.c b/src/mldap.c index 92a330c..79efddb 100644 --- a/src/mldap.c +++ b/src/mldap.c @@ -50,18 +50,7 @@ static unsigned char uuid_rootname_ndata[] = { 4, 'u', 'u', 'i', 'd', 4, 'l', 'd', 'a', 'p', 0 }; static unsigned char uuid_rootname_offsets[] = { 0, 5, 10 }; -static dns_name_t uuid_rootname = -{ - DNS_NAME_MAGIC, - uuid_rootname_ndata, - sizeof(uuid_rootname_ndata), - sizeof(uuid_rootname_offsets), - DNS_NAMEATTR_READONLY | DNS_NAMEATTR_ABSOLUTE, - uuid_rootname_offsets, - NULL, - { (void *)-1, (void *)-1 }, - { NULL, NULL } -}; +static dns_name_t uuid_rootname = DNS_NAME_INITABSOLUTE(uuid_rootname_ndata, uuid_rootname_offsets); struct mldapdb { isc_mem_t *mctx; From 628db201764a0dc76f8e48c1524850de64e2f2fe Mon Sep 17 00:00:00 2001 From: Alexander Bokovoy Date: Feb 14 2024 13:45:57 +0000 Subject: [PATCH 2/2] Include dydnb-config.h prior to any BIND headers Signed-off-by: Alexander Bokovoy --- diff --git a/src/syncrepl.c b/src/syncrepl.c index f94379c..4725bb8 100644 --- a/src/syncrepl.c +++ b/src/syncrepl.c @@ -4,6 +4,7 @@ #include +#include "dyndb-config.h" #include #include #include @@ -11,7 +12,6 @@ #include #include -#include "dyndb-config.h" #include "ldap_helper.h" #include "util.h" #include "semaphore.h"