Another try at OpenBSD fixes.
nameser_compat.h is required on Darwin, but doesn't exist on OpenBSD. Also, OpenBSD doesn't support the ns_c_in or ns_t_srv enums, so the C_IN and T_SRV macros are required.
This commit is contained in:
@@ -35,6 +35,9 @@
|
||||
#include <netdb.h>
|
||||
#include <fcntl.h>
|
||||
#include <arpa/nameser.h>
|
||||
#ifdef HAVE_ARPA_NAMESER_COMPAT_H
|
||||
#include <arpa/nameser_compat.h>
|
||||
#endif
|
||||
#include <resolv.h>
|
||||
#endif
|
||||
|
||||
@@ -865,7 +868,7 @@ int sock_srv_lookup(const char *service, const char *proto, const char *domain,
|
||||
unsigned char buf[65535];
|
||||
int len;
|
||||
|
||||
if ((len = res_query(fulldomain, ns_c_in, ns_t_srv, buf, 65535)) > 0) {
|
||||
if ((len = res_query(fulldomain, C_IN, T_SRV, buf, 65535)) > 0) {
|
||||
int offset;
|
||||
int i;
|
||||
struct dnsquery_header header;
|
||||
|
||||
Reference in New Issue
Block a user