]> Pileus Git - ~andy/fetchmail/blobdiff - mxget.c
Credit John Beck's fixes.
[~andy/fetchmail] / mxget.c
diff --git a/mxget.c b/mxget.c
index 21a366821d8fb687c12f182fce221c6bcf800e7a..4529c223bea99e1abc838837d7dc88f8907df295 100644 (file)
--- a/mxget.c
+++ b/mxget.c
@@ -1,14 +1,16 @@
 /*
  * mxget.c -- fetch MX records for given DNS name
  *
- * Copyright 1997 by Eric S. Raymond
+ * Copyright (C) 1996, 1997, 1998, 2000, 2002 by Eric S. Raymond
+ * Copyright (C) 2005, 2006, 2007 by Matthias Andree
  * For license terms, see the file COPYING in this directory.
  */
 
 #include "config.h"
+#include "fetchmail.h"
 #include <stdio.h>
-#ifdef HAVE_RES_SEARCH
 #include <string.h>
+#ifdef HAVE_RES_SEARCH
 #ifdef HAVE_NET_SOCKET_H
 #include <net/socket.h>
 #endif
@@ -124,8 +126,9 @@ struct mxentry *getmxrecords(const char *name)
 
 int main(int argc, char *argv[])
 {
-    int        count, i;
+#ifdef HAVE_RES_SEARCH
     struct mxentry *responses;
+#endif
 
     if (argc != 2 || 0 == strcmp(argv[1], "-h")) {
        fprintf(stderr, "Usage: %s domain\n", argv[0]);