mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-03 11:25:35 +00:00
res_resolver_unbound: Allow compilation with libunbound version < 1.5
libunbound at version 1.4.20 (which CentOS still uses) declared all of their string function parameters as as 'char *'. 1.4.21 changed them all to 'const char *'. Thankfully 1.4.21 also introduced the UNBOUND_VERSION_MAJOR define so configure now checks for that and sets HAVE_UNBOUND_CONST_PARAMS. res_resolver_unbound then checks that and casts away the 'const' if it's not set. Tested compile and testsuite on CentOS6 (1.4.20), Ubuntu14 (1.4.22) and Fedora24 (1.5.4). There are a few failing tests to be addressed though. ASTERISK-26283 #close Change-Id: Ib708b19b706c5d0ba7b7d5473e6df339d9ae4148
This commit is contained in:
@@ -2101,7 +2101,8 @@ AST_EXT_LIB_CHECK([NEWT], [newt], [newtBell], [newt.h])
|
||||
# script bug which does not find the ldns library. The bug is fixed in
|
||||
# v1.4.22 but that version is not easily detectable.
|
||||
#
|
||||
AST_EXT_LIB_CHECK([UNBOUND], [unbound], [ub_ctx_add_ta_autr], [unbound.h], [])
|
||||
AST_EXT_LIB_CHECK([UNBOUND], [unbound], [ub_ctx_delete], [unbound.h], [])
|
||||
AST_C_DECLARE_CHECK([UNBOUND_CONST_PARAMS], [UNBOUND_VERSION_MAJOR], [unbound.h])
|
||||
|
||||
AST_EXT_LIB_CHECK([UNIXODBC], [odbc], [SQLConnect], [sql.h], [])
|
||||
|
||||
|
Reference in New Issue
Block a user