r10022: Merge tpot's fix for IRIX and AIX_rea build problems from lorikeet-heimdal
authorAndrew Bartlett <abartlet@samba.org>
Sun, 4 Sep 2005 08:17:24 +0000 (08:17 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 18:36:30 +0000 (13:36 -0500)
to Samba4.

Andrew Bartlett
(This used to be commit 6835e427907bf52f7fdd332b726ffa47041853de)

source4/heimdal/lib/roken/resolve.c

index d035982077e814656aae23f1f205cbc471faaf37..8764f422eceb8d9e792f971c94b21e106e550c3e 100644 (file)
@@ -490,7 +490,7 @@ dns_lookup_int(const char *domain, int rr_class, int rr_type)
     memset(&state, 0, sizeof(state));
     if(res_ninit(&state))
        return NULL; /* is this the best we can do? */
-#elif defined(HAVE__RES)
+#elif defined(HAVE__RES) && defined(HAVE_DECL__RES)
     u_long old_options = 0;
 #endif
     
@@ -506,7 +506,7 @@ dns_lookup_int(const char *domain, int rr_class, int rr_type)
        if (_resolve_debug) {
 #ifdef HAVE_RES_NSEARCH
            state.options |= RES_DEBUG;
-#elif defined(HAVE__RES)
+#elif defined(HAVE__RES) && defined(HAVE_DECL__RES)
            old_options = _res.options;
            _res.options |= RES_DEBUG;
 #endif
@@ -526,7 +526,7 @@ dns_lookup_int(const char *domain, int rr_class, int rr_type)
        len = res_search(domain, rr_class, rr_type, reply, size);
 #endif
        if (_resolve_debug) {
-#if defined(HAVE__RES) && !defined(HAVE_RES_NSEARCH)
+#if defined(HAVE__RES) && defined(HAVE_DECL__RES) && !defined(HAVE_RES_NSEARCH)
            _res.options = old_options;
 #endif
            fprintf(stderr, "dns_lookup(%s, %d, %s) --> %d\n",