|
|
45c707 |
From b533d722fa62232955aedfdf1bbc0179f48497eb Mon Sep 17 00:00:00 2001
|
|
|
45c707 |
From: =?UTF-8?q?Petr=20Men=C5=A1=C3=ADk?= <pemensik@redhat.com>
|
|
|
45c707 |
Date: Thu, 1 Mar 2018 19:41:10 +0100
|
|
|
45c707 |
Subject: [PATCH] Support for BIND 9.11.3. Include explicitly isc/util.h in
|
|
|
45c707 |
each file that uses REQUIRE(). Support stdatomic feature, do not use function
|
|
|
45c707 |
call in STATIC_ASSERT().
|
|
|
45c707 |
|
|
|
45c707 |
---
|
|
|
45c707 |
src/bindcfg.c | 1 +
|
|
|
45c707 |
src/fwd_register.c | 1 +
|
|
|
45c707 |
src/ldap_entry.h | 11 +++++------
|
|
|
45c707 |
src/mldap.c | 4 ++--
|
|
|
45c707 |
src/rbt_helper.c | 1 +
|
|
|
45c707 |
src/types.h | 2 +-
|
|
|
45c707 |
6 files changed, 11 insertions(+), 9 deletions(-)
|
|
|
45c707 |
|
|
|
45c707 |
diff --git a/src/bindcfg.c b/src/bindcfg.c
|
|
|
45c707 |
index 9b429ba..5539dea 100644
|
|
|
45c707 |
--- a/src/bindcfg.c
|
|
|
45c707 |
+++ b/src/bindcfg.c
|
|
|
45c707 |
@@ -6,6 +6,7 @@
|
|
|
45c707 |
|
|
|
45c707 |
#include "config.h"
|
|
|
45c707 |
|
|
|
45c707 |
+#include <isc/util.h>
|
|
|
45c707 |
#include <isccfg/grammar.h>
|
|
|
45c707 |
#include <isccfg/namedconf.h>
|
|
|
45c707 |
|
|
|
45c707 |
diff --git a/src/fwd_register.c b/src/fwd_register.c
|
|
|
45c707 |
index 355d15f..7cc0c5a 100644
|
|
|
45c707 |
--- a/src/fwd_register.c
|
|
|
45c707 |
+++ b/src/fwd_register.c
|
|
|
45c707 |
@@ -3,6 +3,7 @@
|
|
|
45c707 |
*/
|
|
|
45c707 |
|
|
|
45c707 |
#include <isc/rwlock.h>
|
|
|
45c707 |
+#include <isc/util.h>
|
|
|
45c707 |
#include <dns/name.h>
|
|
|
45c707 |
|
|
|
45c707 |
#include "rbt_helper.h"
|
|
|
45c707 |
diff --git a/src/ldap_entry.h b/src/ldap_entry.h
|
|
|
45c707 |
index 6498c79..88b1c42 100644
|
|
|
45c707 |
--- a/src/ldap_entry.h
|
|
|
45c707 |
+++ b/src/ldap_entry.h
|
|
|
45c707 |
@@ -6,7 +6,6 @@
|
|
|
45c707 |
#define _LD_LDAP_ENTRY_H_
|
|
|
45c707 |
|
|
|
45c707 |
#include <isc/lex.h>
|
|
|
45c707 |
-#include <isc/util.h>
|
|
|
45c707 |
#include <dns/types.h>
|
|
|
45c707 |
|
|
|
45c707 |
#include "fwd_register.h"
|
|
|
45c707 |
@@ -19,15 +18,15 @@
|
|
|
45c707 |
|
|
|
45c707 |
/* Represents values associated with LDAP attribute */
|
|
|
45c707 |
typedef struct ldap_value ldap_value_t;
|
|
|
45c707 |
-typedef LIST(ldap_value_t) ldap_valuelist_t;
|
|
|
45c707 |
+typedef ISC_LIST(ldap_value_t) ldap_valuelist_t;
|
|
|
45c707 |
struct ldap_value {
|
|
|
45c707 |
char *value;
|
|
|
45c707 |
- LINK(ldap_value_t) link;
|
|
|
45c707 |
+ ISC_LINK(ldap_value_t) link;
|
|
|
45c707 |
};
|
|
|
45c707 |
|
|
|
45c707 |
/* Represents LDAP attribute and it's values */
|
|
|
45c707 |
typedef struct ldap_attribute ldap_attribute_t;
|
|
|
45c707 |
-typedef LIST(ldap_attribute_t) ldap_attributelist_t;
|
|
|
45c707 |
+typedef ISC_LIST(ldap_attribute_t) ldap_attributelist_t;
|
|
|
45c707 |
|
|
|
45c707 |
/* Represents LDAP entry and it's attributes */
|
|
|
45c707 |
typedef unsigned char ldap_entryclass_t;
|
|
|
45c707 |
@@ -41,7 +40,7 @@ struct ldap_entry {
|
|
|
45c707 |
|
|
|
45c707 |
ldap_attribute_t *lastattr;
|
|
|
45c707 |
ldap_attributelist_t attrs;
|
|
|
45c707 |
- LINK(ldap_entry_t) link;
|
|
|
45c707 |
+ ISC_LINK(ldap_entry_t) link;
|
|
|
45c707 |
|
|
|
45c707 |
/* Parsing. */
|
|
|
45c707 |
isc_lex_t *lex;
|
|
|
45c707 |
@@ -59,7 +58,7 @@ struct ldap_attribute {
|
|
|
45c707 |
char **ldap_values;
|
|
|
45c707 |
ldap_value_t *lastval;
|
|
|
45c707 |
ldap_valuelist_t values;
|
|
|
45c707 |
- LINK(ldap_attribute_t) link;
|
|
|
45c707 |
+ ISC_LINK(ldap_attribute_t) link;
|
|
|
45c707 |
};
|
|
|
45c707 |
|
|
|
45c707 |
#define LDAP_ENTRYCLASS_NONE 0x0
|
|
|
45c707 |
diff --git a/src/mldap.c b/src/mldap.c
|
|
|
45c707 |
index 143abce..304ba36 100644
|
|
|
45c707 |
--- a/src/mldap.c
|
|
|
45c707 |
+++ b/src/mldap.c
|
|
|
45c707 |
@@ -119,13 +119,13 @@ void mldap_cur_generation_bump(mldapdb_t *mldap) {
|
|
|
45c707 |
* reference counter value.
|
|
|
45c707 |
*/
|
|
|
45c707 |
STATIC_ASSERT((isc_uint32_t)
|
|
|
45c707 |
- (typeof(isc_refcount_current((isc_refcount_t *)0)))
|
|
|
45c707 |
+ (typeof(((isc_refcount_t *)0)->refs))
|
|
|
45c707 |
-1
|
|
|
45c707 |
== 0xFFFFFFFF, \
|
|
|
45c707 |
"negative isc_refcount_t cannot be properly shortened to 32 bits");
|
|
|
45c707 |
|
|
|
45c707 |
STATIC_ASSERT((isc_uint32_t)
|
|
|
45c707 |
- (typeof(isc_refcount_current((isc_refcount_t *)0)))
|
|
|
45c707 |
+ (typeof(((isc_refcount_t *)0)->refs))
|
|
|
45c707 |
0x90ABCDEF12345678
|
|
|
45c707 |
== 0x12345678, \
|
|
|
45c707 |
"positive isc_refcount_t cannot be properly shortened to 32 bits");
|
|
|
45c707 |
diff --git a/src/rbt_helper.c b/src/rbt_helper.c
|
|
|
45c707 |
index 2a7e6cb..f610b07 100644
|
|
|
45c707 |
--- a/src/rbt_helper.c
|
|
|
45c707 |
+++ b/src/rbt_helper.c
|
|
|
45c707 |
@@ -2,6 +2,7 @@
|
|
|
45c707 |
* Copyright (C) 2013-2014 bind-dyndb-ldap authors; see COPYING for license
|
|
|
45c707 |
*/
|
|
|
45c707 |
|
|
|
45c707 |
+#include <isc/util.h>
|
|
|
45c707 |
#include <dns/rbt.h>
|
|
|
45c707 |
|
|
|
45c707 |
#include "util.h"
|
|
|
45c707 |
diff --git a/src/types.h b/src/types.h
|
|
|
45c707 |
index 25ef3b9..01d627c 100644
|
|
|
45c707 |
--- a/src/types.h
|
|
|
45c707 |
+++ b/src/types.h
|
|
|
45c707 |
@@ -24,7 +24,7 @@
|
|
|
45c707 |
* rdata1 -> rdata2 -> rdata3 rdata4 -> rdata5
|
|
|
45c707 |
* next_rdatalist -> next_rdatalist ...
|
|
|
45c707 |
*/
|
|
|
45c707 |
-typedef LIST(dns_rdatalist_t) ldapdb_rdatalist_t;
|
|
|
45c707 |
+typedef ISC_LIST(dns_rdatalist_t) ldapdb_rdatalist_t;
|
|
|
45c707 |
|
|
|
45c707 |
typedef struct enum_txt_assoc {
|
|
|
45c707 |
int value;
|
|
|
45c707 |
--
|
|
|
45c707 |
2.14.3
|
|
|
45c707 |
|