]> Pileus Git - ~andy/fetchmail/commitdiff
Unbreak 'make check' for systems that don't have HAVE_RES_SEARCH.
authorMatthias Andree <matthias.andree@gmx.de>
Mon, 9 Jan 2006 16:04:28 +0000 (16:04 -0000)
committerMatthias Andree <matthias.andree@gmx.de>
Mon, 9 Jan 2006 16:04:28 +0000 (16:04 -0000)
svn path=/branches/BRANCH_6-3/; revision=4617

mxget.c

diff --git a/mxget.c b/mxget.c
index 3bb5411995f19fb3258686587e221e8c864c965b..30f2a287a1e63bbac9aabe4614026ff59d72c34e 100644 (file)
--- a/mxget.c
+++ b/mxget.c
@@ -130,14 +130,18 @@ int main(int argc, char *argv[])
        exit(1);
     }
 
+#ifdef HAVE_RES_SEARCH
     responses = getmxrecords(argv[1]);
-    if (responses == (struct mxentry *)NULL)
+    if (responses == (struct mxentry *)NULL) {
        puts("No MX records found");
-    else
+    } else {
        do {
            printf("%s %d\n", responses->name, responses->pref);
-       } while
-           ((++responses)->name);
+       } while ((++responses)->name);
+    }
+#else
+    puts("This program was compiled without HAS_RES_SEARCH and does nothing.");
+#endif
 
     return 0;
 }