1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-10-19 19:59:43 +00:00

- Fix build on 6.0 (a conflicting struct name)

Approved by:	portmgr (krion)
This commit is contained in:
Sergey Matveychuk 2005-08-08 07:46:42 +00:00
parent 00e2fe2225
commit 77fa1b5c80
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=140815
3 changed files with 32 additions and 7 deletions

View File

@ -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>

View File

@ -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)))

View File

@ -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;