From 1d933bf8ecdc1cb6f9717d5a8b885a45bcc7020d Mon Sep 17 00:00:00 2001 From: Kurt Zeilenga Date: Sat, 17 Jan 2004 19:11:20 +0000 Subject: [PATCH] Minor tweak to last commit --- libraries/libldap/dnssrv.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/libraries/libldap/dnssrv.c b/libraries/libldap/dnssrv.c index b9279a1d82..4ef1e18b68 100644 --- a/libraries/libldap/dnssrv.c +++ b/libraries/libldap/dnssrv.c @@ -226,16 +226,18 @@ int ldap_domain2hostlist( /* Parse out query */ p = reply; + #ifdef NS_HFIXEDSZ /* Bind 8/9 interface */ p += NS_HFIXEDSZ; -#else -#ifndef HFIXEDSZ -#define HFIXEDSZ sizeof(HEADER) -#endif - /* Bind 4 interface */ +#elif defined(HFIXEDSZ) + /* Bind 4 interface w/ HFIXEDSZ */ p += HFIXEDSZ; +#else + /* Bind 4 interface w/o HFIXEDSZ */ + p += sizeof(HEADER); #endif + status = dn_expand(reply, reply + len, p, host, sizeof(host)); if (status < 0) { goto out; -- 2.39.5