summaryrefslogtreecommitdiff
path: root/mail
diff options
context:
space:
mode:
authorfhajny <fhajny>2012-03-12 13:17:22 +0000
committerfhajny <fhajny>2012-03-12 13:17:22 +0000
commitd5ba28cc67be54c8075dc228c67bb5bf541d61fe (patch)
treeddbd6ea69b306b1fe8f9a7170decf9c4c04b16d3 /mail
parent64b53486fb9f109113de2d33752ea7fbe43762ea (diff)
downloadpkgsrc-d5ba28cc67be54c8075dc228c67bb5bf541d61fe.tar.gz
Make int types used more portable.
Fix a symbol conflict on SunOS. Bump PKGREVISION.
Diffstat (limited to 'mail')
-rw-r--r--mail/milter-greylist/Makefile3
-rw-r--r--mail/milter-greylist/distinfo4
-rw-r--r--mail/milter-greylist/patches/patch-p0f.c83
-rw-r--r--mail/milter-greylist/patches/patch-spamd.c31
4 files changed, 119 insertions, 2 deletions
diff --git a/mail/milter-greylist/Makefile b/mail/milter-greylist/Makefile
index 020ea7a0b6b..8384f28a373 100644
--- a/mail/milter-greylist/Makefile
+++ b/mail/milter-greylist/Makefile
@@ -1,6 +1,7 @@
-# $NetBSD: Makefile,v 1.52 2011/09/05 20:21:34 cheusov Exp $
+# $NetBSD: Makefile,v 1.53 2012/03/12 13:17:22 fhajny Exp $
DISTNAME= milter-greylist-4.2.7
+PKGREVISION= 1
CATEGORIES= mail
MASTER_SITES= ftp://ftp.espci.fr/pub/milter-greylist/
EXTRACT_SUFX= .tgz
diff --git a/mail/milter-greylist/distinfo b/mail/milter-greylist/distinfo
index 2dc5de0ceb1..a5f66cec158 100644
--- a/mail/milter-greylist/distinfo
+++ b/mail/milter-greylist/distinfo
@@ -1,6 +1,8 @@
-$NetBSD: distinfo,v 1.31 2011/05/25 07:15:32 tron Exp $
+$NetBSD: distinfo,v 1.32 2012/03/12 13:17:22 fhajny Exp $
SHA1 (milter-greylist-4.2.7.tgz) = 560d823b0d4fd25fba6f100ca3073b8e6c89edc2
RMD160 (milter-greylist-4.2.7.tgz) = a0f9b01bb625b1ab125a681822ec516b8adc627a
Size (milter-greylist-4.2.7.tgz) = 213919 bytes
SHA1 (patch-aa) = f884ba7efce512f51b6e5593255c4f7fdd468333
+SHA1 (patch-p0f.c) = 9bda4dff42473466548ca649580ba603bc96d389
+SHA1 (patch-spamd.c) = 4cc2804c1177d79bd36b58e34a469fa3d7c92233
diff --git a/mail/milter-greylist/patches/patch-p0f.c b/mail/milter-greylist/patches/patch-p0f.c
new file mode 100644
index 00000000000..e13dcaa7200
--- /dev/null
+++ b/mail/milter-greylist/patches/patch-p0f.c
@@ -0,0 +1,83 @@
+$NetBSD: patch-p0f.c,v 1.1 2012/03/12 13:17:22 fhajny Exp $
+
+. More portable int types.
+. More portable strstr in place of strcasestr.
+. Rename 'sun' to 's_un' to avoid a conflict on SunOS.
+
+--- p0f.c.orig 2011-03-20 09:17:09.000000000 +0000
++++ p0f.c
+@@ -74,25 +74,25 @@ __RCSID("$Id: p0f.c,v 1.7.2.6 2011/03/20
+ #define RESP_NOMATCH 2
+
+ struct p0f_query {
+- u_int32_t magic;
+- u_int8_t type;
+- u_int32_t id;
+- u_int32_t src_ad,dst_ad;
+- u_int16_t src_port,dst_port;
++ uint32_t magic;
++ uint8_t type;
++ uint32_t id;
++ uint32_t src_ad,dst_ad;
++ uint16_t src_port,dst_port;
+ };
+ struct p0f_response {
+- u_int32_t magic;
+- u_int32_t id;
+- u_int8_t type;
+- u_int8_t genre[20];
+- u_int8_t detail[40];
++ uint32_t magic;
++ uint32_t id;
++ uint8_t type;
++ uint8_t genre[20];
++ uint8_t detail[40];
+ int8_t dist;
+- u_int8_t link[30];
+- u_int8_t tos[30];
+- u_int8_t fw,nat;
+- u_int8_t real;
++ uint8_t link[30];
++ uint8_t tos[30];
++ uint8_t fw,nat;
++ uint8_t real;
+ int16_t score;
+- u_int16_t mflags;
++ uint16_t mflags;
+ int32_t uptime;
+ };
+ /* End of stuff borrowed from p0f/p0f-query.h */
+@@ -113,7 +113,7 @@ p0f_cmp(ad, stage, ap, priv)
+ return 0;
+
+ data = (char *)ad->string;
+- if (strcasestr(priv->priv_p0f, data) != NULL)
++ if (strstr(priv->priv_p0f, data) != NULL)
+ return 1;
+ return 0;
+ }
+@@ -262,7 +262,7 @@ p0f_sock_set(sock)
+ static int
+ p0f_connect(void)
+ {
+- struct sockaddr_un sun;
++ struct sockaddr_un s_un;
+ int p0fsock;
+
+ if (!conf.c_p0fsock[0])
+@@ -280,11 +280,11 @@ p0f_connect(void)
+
+ if (conf.c_debug)
+ mg_log(LOG_DEBUG, "using p0f socket \"%s\"", conf.c_p0fsock);
+- (void)memset(&sun, 0, sizeof(sun));
+- sun.sun_family = AF_UNIX;
+- strncpy(sun.sun_path, conf.c_p0fsock, sizeof(sun.sun_path));
++ (void)memset(&s_un, 0, sizeof(s_un));
++ s_un.sun_family = AF_UNIX;
++ strncpy(s_un.sun_path, conf.c_p0fsock, sizeof(s_un.sun_path));
+
+- if (connect(p0fsock, (struct sockaddr *)&sun, sizeof(sun)) != 0) {
++ if (connect(p0fsock, (struct sockaddr *)&s_un, sizeof(s_un)) != 0) {
+ mg_log(LOG_ERR, "Cannot connect to p0f socket \"%s\"",
+ conf.c_p0fsock);
+ close(p0fsock);
diff --git a/mail/milter-greylist/patches/patch-spamd.c b/mail/milter-greylist/patches/patch-spamd.c
new file mode 100644
index 00000000000..466321d1063
--- /dev/null
+++ b/mail/milter-greylist/patches/patch-spamd.c
@@ -0,0 +1,31 @@
+$NetBSD: patch-spamd.c,v 1.1 2012/03/12 13:17:22 fhajny Exp $
+
+Rename 'sun' to 's_un' to avoid a conflict on SunOS
+
+--- spamd.c.orig 2010-06-22 02:13:41.000000000 +0000
++++ spamd.c
+@@ -422,19 +422,19 @@ static int
+ spamd_unix_socket(path)
+ char *path;
+ {
+- struct sockaddr_un sun;
++ struct sockaddr_un s_un;
+ int sock;
+
+- bzero(&sun, sizeof(sun));
+- sun.sun_family = AF_UNIX;
+- strncpy(sun.sun_path, path, sizeof(sun.sun_path) - 1);
++ bzero(&s_un, sizeof(s_un));
++ s_un.sun_family = AF_UNIX;
++ strncpy(s_un.sun_path, path, sizeof(s_un.sun_path) - 1);
+
+ if ((sock = socket(AF_UNIX, SOCK_STREAM, 0)) == -1) {
+ mg_log(LOG_ERR, "spamd socket failed: %s", strerror(errno));
+ return -1;
+ }
+
+- if (connect(sock, (struct sockaddr*) &sun, sizeof(sun))) {
++ if (connect(sock, (struct sockaddr*) &s_un, sizeof(s_un))) {
+ mg_log(LOG_ERR, "spamd connect failed: %s", strerror(errno));
+ return -1;
+ }