Package: smtpfeed
Severity: normal
Tags: patch

When building 'smtpfeed' on amd64 with gcc-4.0,
I get the following error:

dns.c:1767: error: invalid storage class for function 'newmx'
dns.c:1771: warning: implicit declaration of function 'newmx'
dns.c:1772: warning: assignment makes pointer from integer without a cast
dns.c: At top level:
dns.c:1839: error: conflicting types for 'newmx'
dns.c:1771: error: previous implicit declaration of 'newmx' was here
dns.c: In function 'getmxrr':
dns.c:2218: warning: label 'formaterror' defined but not used
dns.c:1991: warning: label 'retry' defined but not used
dns.c: At top level:
dns.c:2225: warning: return type defaults to 'int'
dns.c: In function 'show_query':
dns.c:2241: warning: 'return' with no value, in function returning non-void
dns.c:2251: warning: 'return' with no value, in function returning non-void
dns.c:2261: warning: 'return' with no value, in function returning non-void
dns.c:2272: warning: 'return' with no value, in function returning non-void
dns.c:2281: warning: 'return' with no value, in function returning non-void
make[1]: *** [dns.o] Error 1
make[1]: Leaving directory `/smtpfeed-1.19'
make: *** [build-stamp] Error 2

With the attached patch 'smtpfeed' can be compiled
on amd64 using gcc-4.0.

Regards
Andreas Jochens

diff -urN ../tmp-orig/smtpfeed-1.19/dns.c ./dns.c
--- ../tmp-orig/smtpfeed-1.19/dns.c     2003-08-20 07:13:03.000000000 +0200
+++ ./dns.c     2005-03-07 14:00:41.497669377 +0100
@@ -79,6 +79,13 @@
 # define RES_INSECURE1 0x00000400      /* type 1 security disabled */
 #endif
 
+static int query_domain();
+static int process_query();
+static int make_query();
+static void got_answer();
+static void remove_query();
+static struct mx* newmx(char *name, int pref, int weight, struct domain *dp, 
long opt);
+
 int
 pregetmx(dl)
 struct domain *dl;
@@ -87,7 +94,6 @@
        char **map_arg;
        long stime, etime;
        int n;
-       static int query_domain(), process_query();
 #ifdef INET6
        SockAddr dsin;  /* dummy */
 #endif
@@ -353,7 +359,6 @@
 int type;
 {
        struct dns_stat *qrp, **hashp;
-       static int make_query();
 
        qrp = hash_query_lookup(name, &hashp);
        if (qrp == NULL) {
@@ -396,7 +401,6 @@
        u_char buf[MAXPACKET];
        int n;
        struct query_chain *qchain;
-       static int process_query();
 
        switch (type) {
          case T_MX:
@@ -591,8 +595,6 @@
        char nbuf[MAXDNAME+1];
        struct dns_stat *qrp;
        int pending;
-       static void got_answer();
-       static void remove_query();
 
        if (sync == 0 && cnf.cquery_max != 0
         && query_chain_count >= cnf.cquery_max)
@@ -1764,7 +1766,6 @@
 #endif
                                        {
                                                struct mx *gwmxp;
-                                               static struct mx* newmx();
 
                                                if (cnf.debug & DEBUG_DNS)
                                                log(LOG_DEBUG, "setting 
protocol gateway as first MX");


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to