aboutsummaryrefslogtreecommitdiff
path: root/net-mgmt/sendip
diff options
context:
space:
mode:
authorMartin Wilke <miwi@FreeBSD.org>2007-11-13 09:16:15 +0000
committerMartin Wilke <miwi@FreeBSD.org>2007-11-13 09:16:15 +0000
commit432f808724c47e38a244de7363242c2cadaacb87 (patch)
treebe323b4e5d869eeb04fbf01dede46a4fda94beb1 /net-mgmt/sendip
parent64390ca743f0542a72e412250040b8f9eed71257 (diff)
downloadports-432f808724c47e38a244de7363242c2cadaacb87.tar.gz
ports-432f808724c47e38a244de7363242c2cadaacb87.zip
- Fix build with gcc 4.2
Submitted by: Pietro Cerutti (via im) Approved by: portmgr (pav)
Notes
Notes: svn path=/head/; revision=202680
Diffstat (limited to 'net-mgmt/sendip')
-rw-r--r--net-mgmt/sendip/Makefile8
-rw-r--r--net-mgmt/sendip/files/patch-ipv4.c49
-rw-r--r--net-mgmt/sendip/files/patch-tcp.c22
3 files changed, 72 insertions, 7 deletions
diff --git a/net-mgmt/sendip/Makefile b/net-mgmt/sendip/Makefile
index bad81d3e994d..d0dc40282bc5 100644
--- a/net-mgmt/sendip/Makefile
+++ b/net-mgmt/sendip/Makefile
@@ -20,10 +20,4 @@ USE_LDCONFIG= yes
MAN1= sendip.1
-.include <bsd.port.pre.mk>
-
-.if ${OSVERSION} >= 700042
-BROKEN= Does not compile with GCC 4.2
-.endif
-
-.include <bsd.port.post.mk>
+.include <bsd.port.mk>
diff --git a/net-mgmt/sendip/files/patch-ipv4.c b/net-mgmt/sendip/files/patch-ipv4.c
new file mode 100644
index 000000000000..01c260b1e5d5
--- /dev/null
+++ b/net-mgmt/sendip/files/patch-ipv4.c
@@ -0,0 +1,49 @@
+--- ipv4.c.orig 2007-11-09 20:01:39.000000000 +0100
++++ ipv4.c 2007-11-09 20:02:11.000000000 +0100
+@@ -209,8 +209,8 @@
+ fprintf(stderr,"Out of memory!\n");
+ return FALSE;
+ }
+- sprintf(data,"0x%s",arg);
+- len = compact_string(data);
++ sprintf((char *)data,"0x%s",arg);
++ len = compact_string((char *)data);
+ cp=(*data&0x80)>>7;
+ cls=(*data&0x60)>>5;
+ num=(*data&0x1F);
+@@ -237,7 +237,7 @@
+ free(data);
+ return FALSE;
+ } else {
+- addoption(0,0,7,len+2,data,pack);
++ addoption(0,0,7,len+2,(uint8_t *)data,pack);
+ free(data);
+ }
+ } else if(!strcmp(opt+2, "ts")) {
+@@ -352,7 +352,7 @@
+ data_in = next;
+ }
+
+- addoption(0,2,4,data_out-data+2,data,pack);
++ addoption(0,2,4,data_out-data+2,(uint8_t *)data,pack);
+ free(data);
+ /* End of timestamp parsing */
+
+@@ -377,7 +377,7 @@
+ free(data);
+ return FALSE;
+ } else {
+- addoption(1,0,3,len+2,data,pack);
++ addoption(1,0,3,len+2,(unsigned char *)data,pack);
+ free(data);
+ }
+ } else if(!strcmp(opt+2, "sid")) {
+@@ -399,7 +399,7 @@
+ free(data);
+ return FALSE;
+ } else {
+- addoption(1,0,9,len+2,data,pack);
++ addoption(1,0,9,len+2,(uint8_t *)data,pack);
+ free(data);
+ }
+ } else {
diff --git a/net-mgmt/sendip/files/patch-tcp.c b/net-mgmt/sendip/files/patch-tcp.c
new file mode 100644
index 000000000000..bab2cc721daf
--- /dev/null
+++ b/net-mgmt/sendip/files/patch-tcp.c
@@ -0,0 +1,22 @@
+--- tcp.c.orig 2007-11-09 20:01:31.000000000 +0100
++++ tcp.c 2007-11-09 20:02:17.000000000 +0100
+@@ -204,8 +204,8 @@
+ fprintf(stderr,"Out of memory!\n");
+ return FALSE;
+ }
+- sprintf(data,"0x%s",arg);
+- len = compact_string(data);
++ sprintf((char *)data,"0x%s",arg);
++ len = compact_string((char *)data);
+ if(len==1)
+ addoption(*data,1,NULL,pack);
+ else
+@@ -230,7 +230,7 @@
+ addoption(4,2,NULL,pack);
+ } else if (!strcmp(opt+2, "sack")) {
+ /* Selective Acknowledge rfc1323 */
+- unsigned char *next;
++ char *next;
+ u_int32_t le, re;
+ u_int8_t *comb, *c;
+ int count=0;