Date: Sat, 31 Oct 2009 11:16:24 +0100 (CET) From: olli hauer <ohauer@gmx.de> To: FreeBSD-gnats-submit@FreeBSD.org Cc: ohauer@gmx.de Subject: ports/140136: [MAINTAINER PATCH] port mail/spamd fix build on FreeBSD9 Message-ID: <20091031101624.504BE26145@u18-124.dsl.vianetworks.de> Resent-Message-ID: <200910311020.n9VAK23o023795@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 140136 >Category: ports >Synopsis: [MAINTAINER PATCH] port mail/spamd fix build on FreeBSD9 >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: maintainer-update >Submitter-Id: current-users >Arrival-Date: Sat Oct 31 10:20:02 UTC 2009 >Closed-Date: >Last-Modified: >Originator: olli hauer <ohauer@gmx.de> >Release: FreeBSD 9.0-CURRENT >Organization: >Environment: >Description: Fix build on FreeBSD9 where the function atop in spamd-setup.c is replaced with atop from machine/param.h which results in build failure. >How-To-Repeat: >Fix: --- patch_mail_spamd_FreeBSD9.txt begins here --- --- Makefile.orig +++ Makefile @@ -7,7 +7,7 @@ PORTNAME= spamd PORTVERSION= 4.5.0 -PORTREVISION= 3 +PORTREVISION= 4 CATEGORIES= mail MASTER_SITES= BERLIOS MASTER_SITE_SUBDIR=freebsdspamd --- /dev/null +++ files/patch-spamd-setup__spamd-setup.c @@ -0,0 +1,50 @@ +--- ./spamd-setup/spamd-setup.c.orig 2009-07-19 19:11:35.000000000 +0200 ++++ ./spamd-setup/spamd-setup.c 2009-10-31 10:58:24.000000000 +0100 +@@ -83,7 +83,7 @@ + u_int8_t maxdiff(u_int32_t, u_int32_t); + struct cidr *range2cidrlist(u_int32_t, u_int32_t); + void cidr2range(struct cidr, u_int32_t *, u_int32_t *); +-char *atop(u_int32_t); ++char *a_to_p(u_int32_t); + int parse_netblock(char *, struct bl *, struct bl *, int); + int open_child(char *, char **); + int fileget(char *); +@@ -187,8 +187,10 @@ + *end = cidr.addr + (1 << (32 - cidr.bits)) - 1; + } + ++/* rename atop to a_to_p, since ++ * it collides at FreeBSD9 with atop in machine/param.h */ + char * +-atop(u_int32_t addr) ++a_to_p(u_int32_t addr) + { + struct in_addr in; + +@@ -621,7 +623,7 @@ + while (*blacklists != NULL) { + struct cidr *b = *blacklists; + while (b->addr != 0) { +- fprintf(sdc, ";%s/%u", atop(b->addr), (b->bits)); ++ fprintf(sdc, ";%s/%u", a_to_p(b->addr), (b->bits)); + b++; + } + blacklists++; +@@ -672,7 +674,7 @@ + struct cidr *b = *blacklists; + + while (b->addr != 0) { +- fprintf(pf, "%s/%u\n", atop(b->addr), (b->bits)); ++ fprintf(pf, "%s/%u\n", a_to_p(b->addr), (b->bits)); + b++; + } + blacklists++; +@@ -711,7 +713,7 @@ + ent.tbl = ipfw_tabno; + ent.masklen = b->bits; + ent.value = 0; +- inet_aton(atop(b->addr), (struct in_addr *)&ent.addr); ++ inet_aton(a_to_p(b->addr), (struct in_addr *)&ent.addr); + if (setsockopt(s, IPPROTO_IP, IP_FW_TABLE_ADD, &ent, sizeof(ent)) < 0) + { + err(1, "IPFW setsockopt(IP_FW_TABLE_ADD)"); --- patch_mail_spamd_FreeBSD9.txt ends here --- >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20091031101624.504BE26145>