From 38025e96d51f60b954bcefa7f9bb53c00036d47d Mon Sep 17 00:00:00 2001 From: Kurt Zeilenga Date: Wed, 17 Mar 2004 04:45:56 +0000 Subject: [PATCH] New T_SRV fix --- libraries/libldap/dnssrv.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/libraries/libldap/dnssrv.c b/libraries/libldap/dnssrv.c index 99c69c21de..66d977bd99 100644 --- a/libraries/libldap/dnssrv.c +++ b/libraries/libldap/dnssrv.c @@ -174,11 +174,6 @@ int ldap_domain2dn( return LDAP_SUCCESS; } -/* Bind 4 interface */ -#ifndef T_SRV -# define T_SRV 33 -#endif - /* * Lookup and return LDAP servers for domain (using the DNS * SRV record _ldap._tcp.domain). @@ -215,7 +210,15 @@ int ldap_domain2hostlist( #ifdef NS_HFIXEDSZ /* Bind 8/9 interface */ len = res_query(request, ns_c_in, ns_t_srv, reply, sizeof(reply)); +# ifndef T_SRV +# define T_SRV ns_t_srv +# endif #else + /* Bind 4 interface */ +# ifndef T_SRV +# define T_SRV 33 +# endif + len = res_query(request, C_IN, T_SRV, reply, sizeof(reply)); #endif if (len >= 0) { -- 2.39.5