mirror of
https://github.com/samba-team/samba.git
synced 2025-08-26 01:49:31 +03:00
s4-dns: Check DLZ_DLOPEN_VERSION for different BIND versions
Signed-off-by: Amitay Isaacs <amitay@gmail.com> Reviewed-by: Matthieu Patou <mat@matws.net>
This commit is contained in:
committed by
Amitay Isaacs
parent
58334eb58e
commit
1e5c14548c
@ -853,7 +853,7 @@ static isc_result_t dlz_lookup_types(struct dlz_bind9_data *state,
|
||||
/*
|
||||
lookup one record
|
||||
*/
|
||||
#ifdef BIND_VERSION_9_8
|
||||
#if DLZ_DLOPEN_VERSION == 1
|
||||
_PUBLIC_ isc_result_t dlz_lookup(const char *zone, const char *name,
|
||||
void *dbdata, dns_sdlzlookup_t *lookup)
|
||||
#else
|
||||
|
@ -16,26 +16,22 @@
|
||||
* USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
/*
|
||||
This header provides a minimal set of defines and typedefs needed
|
||||
for building an external DLZ module for bind9. When creating a new
|
||||
external DLZ driver, please copy this header into your own source
|
||||
tree.
|
||||
*/
|
||||
typedef unsigned int isc_result_t;
|
||||
#ifdef BIND_VERSION_9_8
|
||||
#define DLZ_DLOPEN_VERSION 1
|
||||
#elif BIND_VERSION_9_9
|
||||
#define DLZ_DLOPEN_VERSION 2
|
||||
#else
|
||||
#error Unsupported BIND version
|
||||
#endif
|
||||
|
||||
typedef unsigned int isc_result_t;
|
||||
#if DLZ_DLOPEN_VERSION == 1
|
||||
typedef bool isc_boolean_t;
|
||||
#else
|
||||
typedef int isc_boolean_t;
|
||||
#endif
|
||||
typedef uint32_t dns_ttl_t;
|
||||
|
||||
#ifdef BIND_VERSION_9_8
|
||||
#define DLZ_DLOPEN_VERSION 1
|
||||
#else
|
||||
#define DLZ_DLOPEN_VERSION 2
|
||||
#endif
|
||||
|
||||
/* return this in flags to dlz_version() if thread safe */
|
||||
#define DNS_SDLZFLAG_THREADSAFE 0x00000001U
|
||||
|
||||
|
Reference in New Issue
Block a user