1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-12-23 04:23:08 +00:00

- Build arping 2.x as it's distribution default

PR:		ports/102058
Reported by:	Dr. Markus Waldeck <waldeck at gmx.de>
Approved by:	maintainer timeout
This commit is contained in:
Rong-En Fan 2007-04-17 03:32:46 +00:00
parent 1faa4bae45
commit e7d3cf5fc7
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=190166
3 changed files with 6 additions and 37 deletions

View File

@ -7,29 +7,29 @@
PORTNAME= arping
PORTVERSION= 2.05
PORTREVISION= 1
PORTREVISION= 2
CATEGORIES= net
MASTER_SITES= ftp://ftp.habets.pp.se/pub/synscan/
MAINTAINER= gavin.atkinson@ury.york.ac.uk
COMMENT= ARP level "ping" utility
BUILD_DEPENDS= ${LIBNET_CONFIG}:${PORTSDIR}/net/libnet10
BUILD_DEPENDS= ${LIBNET_CONFIG}:${PORTSDIR}/net/libnet
LDFLAGS+= -lpcap
MAN8= arping.8
PLIST_FILES= sbin/arping
LIBNET_CONFIG?= ${LOCALBASE}/bin/libnet10-config
LIBNET_CONFIG?= ${LOCALBASE}/bin/libnet11-config
do-build:
cd ${WRKSRC} && \
${CC} ${CFLAGS} -I${LOCALBASE}/include -L${LOCALBASE}/lib \
-DUSE_NETIF=1 -DFREEBSD=1 -c `${LIBNET_CONFIG} --defines` \
`${LIBNET_CONFIG} --cflags` ${PORTNAME}.c && \
-c `${LIBNET_CONFIG} --defines` \
`${LIBNET_CONFIG} --cflags` ${PORTNAME}-2/${PORTNAME}.c && \
${CC} ${CFLAGS} -I${LOCALBASE}/include -L${LOCALBASE}/lib \
-DUSE_NETIF=1 -DFREEBSD=1 -o ${PORTNAME} ${PORTNAME}.o \
-o ${PORTNAME} ${PORTNAME}.o \
`${LIBNET_CONFIG} --libs` ${LDFLAGS}
do-install:

View File

@ -1,20 +0,0 @@
--- 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

@ -1,11 +0,0 @@
--- 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;