Update headers to support bind 9.11.5

BIND updated its headers without backward compatiblity layer inside.
New releases removed custom types from its own sources, like
isc_uint32_t and isc_boolean_t. They replaced it with standard types
uint32_t and bool. Until all usages are replaced, this is required to
compile. Unfortunately no backward compatiblity is provided.
This commit is contained in:
Petr Menšík 2018-11-05 19:58:41 +01:00
parent af60d375af
commit 8957a1414e
2 changed files with 129 additions and 1 deletions

View File

@ -0,0 +1,123 @@
From 925159b0e3757e650d9dbdb7888f6d66dde6d62f Mon Sep 17 00:00:00 2001
From: rpm-build <rpm-build>
Date: Mon, 5 Nov 2018 19:49:03 +0100
Subject: [PATCH] Adjust to changes in bind 9.11.5
Custom types like isc_boolean_t and isc_uint32_t were removed from bind
headers. Compatibility headers are included, but have to be manually
used. Better change would be to start using uint32_t and bool types,
but that changes too much of code for now.
---
src/fwd.c | 2 ++
src/ldap_entry.c | 1 +
src/ldap_helper.c | 1 +
src/ldap_helper.h | 1 +
src/mldap.c | 1 +
src/settings.h | 2 ++
src/types.h | 2 ++
src/zone.c | 1 +
8 files changed, 11 insertions(+)
diff --git a/src/fwd.c b/src/fwd.c
index 840f0e8..f1ab60c 100644
--- a/src/fwd.c
+++ b/src/fwd.c
@@ -6,6 +6,8 @@
#include "config.h"
+#include <isc/boolean.h>
+
#include <isccfg/grammar.h>
#include <dns/forward.h>
diff --git a/src/ldap_entry.c b/src/ldap_entry.c
index 96a6ef8..00a7e89 100644
--- a/src/ldap_entry.c
+++ b/src/ldap_entry.c
@@ -7,6 +7,7 @@
#include <dns/ttl.h>
#include <dns/types.h>
+#include <isc/int.h>
#include <isc/region.h>
#include <isc/types.h>
#include <isc/util.h>
diff --git a/src/ldap_helper.c b/src/ldap_helper.c
index e0c4b76..74c0afe 100644
--- a/src/ldap_helper.c
+++ b/src/ldap_helper.c
@@ -26,6 +26,7 @@
#include <isc/buffer.h>
#include <isc/dir.h>
+#include <isc/int.h>
#include <isc/mem.h>
#include <isc/mutex.h>
#include <isc/region.h>
diff --git a/src/ldap_helper.h b/src/ldap_helper.h
index 6cfece5..fc21bb3 100644
--- a/src/ldap_helper.h
+++ b/src/ldap_helper.h
@@ -7,6 +7,7 @@
#include "types.h"
+#include <isc/boolean.h>
#include <isc/eventclass.h>
#include <isc/util.h>
#include <isccfg/cfg.h>
diff --git a/src/mldap.c b/src/mldap.c
index 304ba36..8b90921 100644
--- a/src/mldap.c
+++ b/src/mldap.c
@@ -10,6 +10,7 @@
#include <uuid/uuid.h>
#include <isc/boolean.h>
+#include <isc/int.h>
#include <isc/net.h>
#include <isc/refcount.h>
#include <isc/result.h>
diff --git a/src/settings.h b/src/settings.h
index 16a1e63..6585d8b 100644
--- a/src/settings.h
+++ b/src/settings.h
@@ -6,6 +6,8 @@
#define _LD_SETTINGS_H_
#include <isc/types.h>
+#include <isc/boolean.h>
+#include <isc/int.h>
#include <isccfg/grammar.h>
diff --git a/src/types.h b/src/types.h
index 01d627c..41ef476 100644
--- a/src/types.h
+++ b/src/types.h
@@ -5,7 +5,9 @@
#ifndef _LD_TYPES_H_
#define _LD_TYPES_H_
+#include <isc/boolean.h>
#include <isc/event.h>
+#include <isc/int.h>
#include <isc/refcount.h>
#include <dns/name.h>
diff --git a/src/zone.c b/src/zone.c
index 284136e..b9c9936 100644
--- a/src/zone.c
+++ b/src/zone.c
@@ -2,6 +2,7 @@
* Copyright (C) 2014-2015 bind-dyndb-ldap authors; see COPYING for license
*/
+#include <isc/int.h>
#include <isc/types.h>
#include <isc/util.h>
--
2.14.5

View File

@ -4,7 +4,7 @@
Name: bind-dyndb-ldap
Version: 11.1
Release: 12%{?dist}
Release: 13%{?dist}
Summary: LDAP back-end plug-in for BIND
Group: System Environment/Libraries
@ -15,6 +15,7 @@ Source1: https://releases.pagure.org/%{name}/%{name}-%{VERSION}.tar.bz2.a
Patch1: 0001-Coverity-fix-REVERSE_INULL-for-pevent-inst.patch
Patch2: 0002-Add-empty-callback-for-getsize.patch
Patch3: 0003-Support-for-BIND-9.11.3.patch
Patch4: 0004-Support-for-BIND-9.11.5.patch
BuildRequires: bind-devel >= %{bind_version}, bind-lite-devel >= %{bind_version}, bind-pkcs11-devel >= %{bind_version}
BuildRequires: krb5-devel
@ -36,6 +37,7 @@ off of your LDAP server.
%patch1 -p1
%patch2 -p1
%patch3 -p1
%patch4 -p1
%build
autoreconf -fiv
@ -101,6 +103,9 @@ sed -i.bak -e "$SEDSCRIPT" /etc/named.conf
%changelog
* Mon Nov 05 2018 Petr Menšík <pemensik@redhat.com> - 11.1-13
- Support for bind 9.11.5 headers
* Thu Jul 12 2018 Petr Menšík <pemensik@redhat.com> - 11.1-12
- Require bind with writable home, update to 9.11.4