aboutsummaryrefslogtreecommitdiffstats
path: root/mxget.c
diff options
context:
space:
mode:
Diffstat (limited to 'mxget.c')
-rw-r--r--mxget.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/mxget.c b/mxget.c
index 3bb54119..30f2a287 100644
--- 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;
}