summaryrefslogtreecommitdiff
path: root/net/flow-tools/patches
diff options
context:
space:
mode:
authorseb <seb@pkgsrc.org>2006-07-18 11:06:48 +0000
committerseb <seb@pkgsrc.org>2006-07-18 11:06:48 +0000
commit29838edd678b83f2ffd9710426e0108646106304 (patch)
treeeba8fd1e86a7a38d8570c284f977e6fad54542e8 /net/flow-tools/patches
parent1d9e36ecc1fc37bd76ac8a84b26107cfef649898 (diff)
downloadpkgsrc-29838edd678b83f2ffd9710426e0108646106304.tar.gz
Make this package compile with NetBSD current's gcc (4.1.2).
Thanks to matt@ for the course on pointer arithmetic.
Diffstat (limited to 'net/flow-tools/patches')
-rw-r--r--net/flow-tools/patches/patch-ar13
-rw-r--r--net/flow-tools/patches/patch-as22
-rw-r--r--net/flow-tools/patches/patch-at102
3 files changed, 137 insertions, 0 deletions
diff --git a/net/flow-tools/patches/patch-ar b/net/flow-tools/patches/patch-ar
new file mode 100644
index 00000000000..15dd53e2a53
--- /dev/null
+++ b/net/flow-tools/patches/patch-ar
@@ -0,0 +1,13 @@
+$NetBSD: patch-ar,v 1.1 2006/07/18 11:06:48 seb Exp $
+
+--- lib/ftchash.c.orig 2003-08-12 18:04:25.000000000 +0000
++++ lib/ftchash.c
+@@ -326,7 +326,7 @@ void *ftchash_foreach(struct ftchash *ft
+ (char*)ftch->traverse_chunk->base+ftch->traverse_chunk->next) {
+
+ ret = ftch->traverse_rec;
+- (char*)ftch->traverse_rec += ftch->d_size;
++ ftch->traverse_rec = (char*)(ftch->traverse_rec) + ftch->d_size;
+ return ret;
+
+ } else {
diff --git a/net/flow-tools/patches/patch-as b/net/flow-tools/patches/patch-as
new file mode 100644
index 00000000000..309059eb15d
--- /dev/null
+++ b/net/flow-tools/patches/patch-as
@@ -0,0 +1,22 @@
+$NetBSD: patch-as,v 1.1 2006/07/18 11:06:48 seb Exp $
+
+--- lib/ftio.c.orig 2003-02-24 00:51:47.000000000 +0000
++++ lib/ftio.c
+@@ -2267,7 +2267,7 @@ int readn(register int fd, register void
+ break;
+
+ nleft -= nread;
+- (char*)ptr += nread;
++ ptr = (char*)ptr + nread;
+ }
+ return (nbytes - nleft);
+ } /* readn */
+@@ -2292,7 +2292,7 @@ int writen(register int fd, register voi
+ return(nwritten); /* error */
+
+ nleft -= nwritten;
+- (char*)ptr += nwritten;
++ ptr = (char*)ptr + nwritten;
+ }
+ return(nbytes - nleft);
+ } /* writen */
diff --git a/net/flow-tools/patches/patch-at b/net/flow-tools/patches/patch-at
new file mode 100644
index 00000000000..aefef6e588d
--- /dev/null
+++ b/net/flow-tools/patches/patch-at
@@ -0,0 +1,102 @@
+$NetBSD: patch-at,v 1.1 2006/07/18 11:06:48 seb Exp $
+
+--- lib/fttlv.c.orig 2003-02-13 02:38:43.000000000 +0000
++++ lib/fttlv.c
+@@ -68,10 +68,10 @@ int fttlv_enc_uint32(void *buf, int buf_
+ }
+
+ bcopy(&t, buf, 2);
+- (char*)buf+= 2;
++ buf = (char*)buf + 2;
+
+ bcopy(&len, buf, 2);
+- (char*)buf+= 2;
++ buf = (char*)buf + 2;
+
+ bcopy(&v, buf, 4);
+
+@@ -107,10 +107,10 @@ int fttlv_enc_uint16(void *buf, int buf_
+ }
+
+ bcopy(&t, buf, 2);
+- (char*)buf+= 2;
++ buf = (char*)buf + 2;
+
+ bcopy(&len, buf, 2);
+- (char*)buf+= 2;
++ buf = (char*)buf + 2;
+
+ bcopy(&v, buf, 2);
+
+@@ -145,10 +145,10 @@ int fttlv_enc_uint8(void *buf, int buf_s
+ }
+
+ bcopy(&t, buf, 2);
+- (char*)buf+= 2;
++ buf = (char*)buf + 2;
+
+ bcopy(&len, buf, 2);
+- (char*)buf+= 2;
++ buf = (char*)buf + 2;
+
+ bcopy(&v, buf, 1);
+
+@@ -183,10 +183,10 @@ int fttlv_enc_str(void *buf, int buf_siz
+ }
+
+ bcopy(&t, buf, 2);
+- (char*)buf+= 2;
++ buf = (char*)buf + 2;
+
+ bcopy(&len, buf, 2);
+- (char*)buf+= 2;
++ buf = (char*)buf + 2;
+
+ bcopy(v, buf, len);
+
+@@ -230,16 +230,16 @@ int fttlv_enc_ifname(void *buf, int buf_
+ return -1;
+
+ bcopy(&t, buf, 2);
+- (char*)buf+= 2;
++ buf = (char*)buf + 2;
+
+ bcopy(&len, buf, 2);
+- (char*)buf+= 2;
++ buf = (char*)buf + 2;
+
+ bcopy(&ip, buf, 4);
+- (char*)buf += 4;
++ buf = (char*)buf + 4;
+
+ bcopy(&ifIndex, buf, 2);
+- (char*)buf += 2;
++ buf = (char*)buf + 2;
+
+ bcopy(name, buf, n);
+
+@@ -287,19 +287,19 @@ int fttlv_enc_ifalias(void *buf, int buf
+ }
+
+ bcopy(&t, buf, 2);
+- (char*)buf+= 2;
++ buf = (char*)buf + 2;
+
+ bcopy(&len, buf, 2);
+- (char*)buf+= 2;
++ buf = (char*)buf + 2;
+
+ bcopy(&ip, buf, 4);
+- (char*)buf += 4;
++ buf = (char*)buf + 4;
+
+ bcopy(&entries, buf, 2);
+- (char*)buf += 2;
++ buf = (char*)buf + 2;
+
+ bcopy(ifIndex_list, buf, esize);
+- (char*)buf += esize;
++ buf = (char*)buf + esize;
+
+ bcopy(name, buf, n);
+