]> Pileus Git - ~andy/fetchmail/commitdiff
Fix more compiler warnings if compiled without RES_SEARCH.
authorMatthias Andree <matthias.andree@gmx.de>
Mon, 25 May 2009 09:54:13 +0000 (09:54 -0000)
committerMatthias Andree <matthias.andree@gmx.de>
Mon, 25 May 2009 09:54:13 +0000 (09:54 -0000)
svn path=/branches/BRANCH_6-3/; revision=5329

checkalias.c

index 80356ed292a5f6dca37d3e94d14f7c1e8d3d9444..353be44d1f3404a75bc4d0f3aefe0497035a2f27 100644 (file)
@@ -28,6 +28,7 @@
 
 typedef unsigned char address_t[sizeof (struct in_addr)];
 
+#ifdef HAVE_RES_SEARCH
 static int getaddresses(struct addrinfo **result, const char *name)
 {
     struct addrinfo hints;
@@ -82,15 +83,18 @@ found:
        fm_freeaddrinfo(res1);
     return rc;
 }
+#endif
 
 int is_host_alias(const char *name, struct query *ctl, struct addrinfo **res)
 /* determine whether name is a DNS alias of the mailserver for this query */
 {
+#ifdef HAVE_RES_SEARCH
     struct mxentry     *mxp, *mxrecords;
-    struct idlist      *idl;
-    size_t             namelen;
     int                        e;
     struct addrinfo    hints, *res_st;
+#endif
+    struct idlist      *idl;
+    size_t             namelen;
 
     struct hostdata *lead_server =
        ctl->server.lead_server ? ctl->server.lead_server : &ctl->server;
@@ -143,6 +147,7 @@ int is_host_alias(const char *name, struct query *ctl, struct addrinfo **res)
     if (!ctl->server.dns)
        return(FALSE);
 #ifndef HAVE_RES_SEARCH
+    (void)res;
     return(FALSE);
 #else
     /*