aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormiwi <miwi@FreeBSD.org>2009-11-04 18:15:25 +0800
committermiwi <miwi@FreeBSD.org>2009-11-04 18:15:25 +0800
commit1f2f4a69610ae71703db275ba9242e9604047f8b (patch)
tree811e010e0e5d29704050500ca668a47b3aee90fa
parent6f7a0e4da81b6d1db64939d09281ae83c053a1c6 (diff)
downloadfreebsd-ports-gnome-1f2f4a69610ae71703db275ba9242e9604047f8b.tar.gz
freebsd-ports-gnome-1f2f4a69610ae71703db275ba9242e9604047f8b.tar.zst
freebsd-ports-gnome-1f2f4a69610ae71703db275ba9242e9604047f8b.zip
- Fix build on FreeBSD 9
PR: 140136 Submitted by: olli hauer <ohauer@gmx.de> (maintainer)
-rw-r--r--mail/spamd/files/patch-spamd-setup__spamd-setup.c50
1 files changed, 50 insertions, 0 deletions
diff --git a/mail/spamd/files/patch-spamd-setup__spamd-setup.c b/mail/spamd/files/patch-spamd-setup__spamd-setup.c
new file mode 100644
index 000000000000..68f542b4a638
--- /dev/null
+++ b/mail/spamd/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)");