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:
parent
00e2fe2225
commit
77fa1b5c80
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=140815
@ -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>
|
||||
|
20
net/arping/files/patch-arping.c
Normal file
20
net/arping/files/patch-arping.c
Normal 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)))
|
11
net/arping/files/patch-freebsd.h
Normal file
11
net/arping/files/patch-freebsd.h
Normal 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;
|
Loading…
Reference in New Issue
Block a user