mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-03 03:20:57 +00:00
Add support for older name resolving version libraries like openBSD
Fix support of OS's like openBSD that use an older nameser.h, this change reverts the defines to the older style which on other systems is found in nameser_compat.h Tested on openBSD 6.0, Debian 8 ASTERISK-26608 #close Change-Id: Iffb36caab8c5aa9dece0ce2d009041f7b56cc86a
This commit is contained in:
@@ -30,6 +30,7 @@
|
||||
#include "asterisk.h"
|
||||
|
||||
#include <arpa/nameser.h>
|
||||
#include <netinet/in.h>
|
||||
#include <resolv.h>
|
||||
#include <regex.h>
|
||||
|
||||
@@ -590,7 +591,7 @@ const char *ast_dns_naptr_get_flags(const struct ast_dns_record *record)
|
||||
{
|
||||
struct ast_dns_naptr_record *naptr = (struct ast_dns_naptr_record *) record;
|
||||
|
||||
ast_assert(ast_dns_record_get_rr_type(record) == ns_t_naptr);
|
||||
ast_assert(ast_dns_record_get_rr_type(record) == T_NAPTR);
|
||||
return naptr->flags;
|
||||
}
|
||||
|
||||
@@ -598,7 +599,7 @@ const char *ast_dns_naptr_get_service(const struct ast_dns_record *record)
|
||||
{
|
||||
struct ast_dns_naptr_record *naptr = (struct ast_dns_naptr_record *) record;
|
||||
|
||||
ast_assert(ast_dns_record_get_rr_type(record) == ns_t_naptr);
|
||||
ast_assert(ast_dns_record_get_rr_type(record) == T_NAPTR);
|
||||
return naptr->service;
|
||||
}
|
||||
|
||||
@@ -606,7 +607,7 @@ const char *ast_dns_naptr_get_regexp(const struct ast_dns_record *record)
|
||||
{
|
||||
struct ast_dns_naptr_record *naptr = (struct ast_dns_naptr_record *) record;
|
||||
|
||||
ast_assert(ast_dns_record_get_rr_type(record) == ns_t_naptr);
|
||||
ast_assert(ast_dns_record_get_rr_type(record) == T_NAPTR);
|
||||
return naptr->regexp;
|
||||
}
|
||||
|
||||
@@ -614,7 +615,7 @@ const char *ast_dns_naptr_get_replacement(const struct ast_dns_record *record)
|
||||
{
|
||||
struct ast_dns_naptr_record *naptr = (struct ast_dns_naptr_record *) record;
|
||||
|
||||
ast_assert(ast_dns_record_get_rr_type(record) == ns_t_naptr);
|
||||
ast_assert(ast_dns_record_get_rr_type(record) == T_NAPTR);
|
||||
return naptr->replacement;
|
||||
}
|
||||
|
||||
@@ -622,7 +623,7 @@ unsigned short ast_dns_naptr_get_order(const struct ast_dns_record *record)
|
||||
{
|
||||
struct ast_dns_naptr_record *naptr = (struct ast_dns_naptr_record *) record;
|
||||
|
||||
ast_assert(ast_dns_record_get_rr_type(record) == ns_t_naptr);
|
||||
ast_assert(ast_dns_record_get_rr_type(record) == T_NAPTR);
|
||||
return naptr->order;
|
||||
}
|
||||
|
||||
@@ -630,6 +631,6 @@ unsigned short ast_dns_naptr_get_preference(const struct ast_dns_record *record)
|
||||
{
|
||||
struct ast_dns_naptr_record *naptr = (struct ast_dns_naptr_record *) record;
|
||||
|
||||
ast_assert(ast_dns_record_get_rr_type(record) == ns_t_naptr);
|
||||
ast_assert(ast_dns_record_get_rr_type(record) == T_NAPTR);
|
||||
return naptr->preference;
|
||||
}
|
||||
|
Reference in New Issue
Block a user