aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorsem <sem@FreeBSD.org>2005-08-08 15:46:42 +0800
committersem <sem@FreeBSD.org>2005-08-08 15:46:42 +0800
commitc2b9f7e9086fa40612966dac97a479d60172e19c (patch)
treea4357a108ca8453b1bdff12da3656be6169c0da8 /net
parent0ce5a0592ed49b410db3fd3d7c59051022ef3f70 (diff)
downloadfreebsd-ports-gnome-c2b9f7e9086fa40612966dac97a479d60172e19c.tar.gz
freebsd-ports-gnome-c2b9f7e9086fa40612966dac97a479d60172e19c.tar.zst
freebsd-ports-gnome-c2b9f7e9086fa40612966dac97a479d60172e19c.zip
- Fix build on 6.0 (a conflicting struct name)
Approved by: portmgr (krion)
Diffstat (limited to 'net')
-rw-r--r--net/arping/Makefile8
-rw-r--r--net/arping/files/patch-arping.c20
-rw-r--r--net/arping/files/patch-freebsd.h11
3 files changed, 32 insertions, 7 deletions
diff --git a/net/arping/Makefile b/net/arping/Makefile
index 62bdd622a065..cf16ab061495 100644
--- a/net/arping/Makefile
+++ b/net/arping/Makefile
@@ -20,12 +20,6 @@ LDFLAGS+= -lpcap
MAN8= arping.8
PLIST_FILES= sbin/arping
-.include <bsd.port.pre.mk>
-
-.if ${OSVERSION} >= 600031
-BROKEN= "Does not compile on FreeBSD >= 6.0"
-.endif
-
do-build:
cd ${WRKSRC} && \
${CC} ${CFLAGS} -I${LOCALBASE}/include -L${LOCALBASE}/lib \
@@ -39,4 +33,4 @@ do-install:
${INSTALL_PROGRAM} ${WRKSRC}/arping ${PREFIX}/sbin
${INSTALL_MAN} ${WRKSRC}/arping.8 ${PREFIX}/man/man8
-.include <bsd.port.post.mk>
+.include <bsd.port.mk>
diff --git a/net/arping/files/patch-arping.c b/net/arping/files/patch-arping.c
new file mode 100644
index 000000000000..2098e8fef641
--- /dev/null
+++ b/net/arping/files/patch-arping.c
@@ -0,0 +1,20 @@
+--- arping.c.orig Mon Aug 8 07:21:57 2005
++++ arping.c Mon Aug 8 07:22:23 2005
+@@ -258,7 +258,7 @@
+ struct ethhdr *eth;
+ struct arphdr *harp;
+ struct iphdr *hip;
+- struct icmphdr *hicmp;
++ struct icmphdr_ *hicmp;
+ unsigned int c;
+ unsigned char *cp;
+ struct timeval recvtime;
+@@ -276,7 +276,7 @@
+ // ping mac
+ hip = (struct iphdr*)((char*)eth
+ + sizeof(struct libnet_ethernet_hdr));
+- hicmp = (struct icmphdr*)((char*)hip + sizeof(struct iphdr));
++ hicmp = (struct icmphdr_*)((char*)hip + sizeof(struct iphdr));
+ if ((htons(hicmp->type) == ICMP_ECHOREPLY)
+ && ((!memcmp(eth->h_source, eth_target, ETH_ALEN)
+ || !memcmp(eth_target, eth_xmas, ETH_ALEN)))
diff --git a/net/arping/files/patch-freebsd.h b/net/arping/files/patch-freebsd.h
new file mode 100644
index 000000000000..ea55af8b4905
--- /dev/null
+++ b/net/arping/files/patch-freebsd.h
@@ -0,0 +1,11 @@
+--- freebsd.h.orig Mon Aug 8 07:22:04 2005
++++ freebsd.h Mon Aug 8 07:22:35 2005
+@@ -11,7 +11,7 @@
+ __u16 h_proto;/* packet type ID field*/
+ };
+
+-struct icmphdr {
++struct icmphdr_ {
+ __u8 type;
+ __u8 code;
+ __u16 checksum;