summaryrefslogtreecommitdiff
path: root/net
diff options
context:
space:
mode:
authorSergey Matveychuk <sem@FreeBSD.org>2005-08-08 07:46:42 +0000
committerSergey Matveychuk <sem@FreeBSD.org>2005-08-08 07:46:42 +0000
commit77fa1b5c80e71c85966605d58beaf04a104c982b (patch)
treefee725cec0ef48ca3449c6e247cea701f42e9fa8 /net
parent- Fix dependency on pcre++ (diff)
- Fix build on 6.0 (a conflicting struct name)
Approved by: portmgr (krion)
Notes
Notes: svn path=/head/; revision=140815
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;