diff options
author | Amitay Isaacs <amitay@gmail.com> | 2020-09-11 12:16:01 +1000 |
---|---|---|
committer | Karolin Seeger <kseeger@samba.org> | 2020-10-26 12:17:33 +0000 |
commit | 4cbeb5ca3c387b9d893e729e339db1a9adbf03b4 (patch) | |
tree | bfdf7aa3f43e0d8e16c0a908233dc63fae9538d3 | |
parent | d5933bfdee2365c6b5745a3aca42a6d7a48eaf96 (diff) | |
download | samba-4cbeb5ca3c387b9d893e729e339db1a9adbf03b4.tar.gz |
bind9-dlz: Bind 9.13.x switched to using bool as isc_boolean_t instead of int.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=14487
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Rowland Penny <rpenny@samba.org>
(cherry picked from commit cdb6c5d1eca1c0f6967941dbd1da07be6b53d302)
-rw-r--r-- | source4/dns_server/dlz_minimal.h | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/source4/dns_server/dlz_minimal.h b/source4/dns_server/dlz_minimal.h index 193904f4b2c..9a7090f48fd 100644 --- a/source4/dns_server/dlz_minimal.h +++ b/source4/dns_server/dlz_minimal.h @@ -23,30 +23,41 @@ #ifndef DLZ_MINIMAL_H #define DLZ_MINIMAL_H 1 +#include <stdint.h> +#include <stdbool.h> + #if defined (BIND_VERSION_9_8) # define DLZ_DLOPEN_VERSION 1 #elif defined (BIND_VERSION_9_9) # define DLZ_DLOPEN_VERSION 2 # define DNS_CLIENTINFO_VERSION 1 +# define ISC_BOOLEAN_AS_BOOL 0 #elif defined (BIND_VERSION_9_10) # define DLZ_DLOPEN_VERSION 3 # define DNS_CLIENTINFO_VERSION 1 +# define ISC_BOOLEAN_AS_BOOL 0 #elif defined (BIND_VERSION_9_11) # define DLZ_DLOPEN_VERSION 3 # define DNS_CLIENTINFO_VERSION 2 +# define ISC_BOOLEAN_AS_BOOL 0 #elif defined (BIND_VERSION_9_12) # define DLZ_DLOPEN_VERSION 3 # define DNS_CLIENTINFO_VERSION 2 +# define ISC_BOOLEAN_AS_BOOL 0 #else # error Unsupported BIND version #endif +#ifndef ISC_BOOLEAN_AS_BOOL +#define ISC_BOOLEAN_AS_BOOL 1 +#endif + #if DLZ_DLOPEN_VERSION > 1 # define DLZ_DLOPEN_AGE 0 #endif typedef unsigned int isc_result_t; -#if DLZ_DLOPEN_VERSION == 1 +#if ISC_BOOLEAN_AS_BOOL == 1 typedef bool isc_boolean_t; #else typedef int isc_boolean_t; @@ -72,8 +83,13 @@ typedef uint32_t dns_ttl_t; #define ISC_R_FILENOTFOUND 38 /* boolean values */ +#if ISC_BOOLEAN_AS_BOOL == 1 +#define ISC_TRUE true +#define ISC_FALSE false +#else #define ISC_TRUE 1 #define ISC_FALSE 0 +#endif /* log levels */ #define ISC_LOG_INFO (-1) |