From 6ce7c72d01782000ce3236fa25ace2cdc7ad4a79 Mon Sep 17 00:00:00 2001 From: Kevin Lo Date: Thu, 31 Dec 2015 06:18:46 +0000 Subject: Mark this unbroken on FreeBSD < 1100030. Pointed out by: mat --- net/hping-devel/Makefile | 8 +++++++- net/hping-devel/files/extra-patch-sendip.c | 33 ++++++++++++++++++++++++++++++ net/hping-devel/files/patch-sendip.c | 33 ------------------------------ 3 files changed, 40 insertions(+), 34 deletions(-) create mode 100644 net/hping-devel/files/extra-patch-sendip.c delete mode 100644 net/hping-devel/files/patch-sendip.c (limited to 'net/hping-devel') diff --git a/net/hping-devel/Makefile b/net/hping-devel/Makefile index fb98eec711dc..c53e7804c51c 100644 --- a/net/hping-devel/Makefile +++ b/net/hping-devel/Makefile @@ -29,6 +29,12 @@ PORTEXAMPLES= README apd.htcl apd2.htcl ciscoios.htcl ciscoios0.htcl \ passivets.htcl ping.htcl raw.htcl show-tcpseq.htcl \ showled.htcl +.include + +.if (${OSVERSION} >= 1100030) +EXTRA_PATCHES= ${FILESDIR}/extra-patch-sendip.c +.endif + do-install: ${INSTALL_PROGRAM} ${WRKSRC}/hping3 ${STAGEDIR}${PREFIX}/sbin/hping ${INSTALL_MAN} ${WRKSRC}/docs/hping3.8 ${STAGEDIR}${PREFIX}/man/man8/hping.8 @@ -43,4 +49,4 @@ do-install: .endfor ${INSTALL_DATA} ${PORTEXAMPLES:S|^|${WRKSRC}/lib/|} ${STAGEDIR}${EXAMPLESDIR} -.include +.include diff --git a/net/hping-devel/files/extra-patch-sendip.c b/net/hping-devel/files/extra-patch-sendip.c new file mode 100644 index 000000000000..872861983e5a --- /dev/null +++ b/net/hping-devel/files/extra-patch-sendip.c @@ -0,0 +1,33 @@ +--- sendip.c.orig 2003-08-01 21:28:07.000000000 +0800 ++++ sendip.c 2015-12-22 23:16:39.296072000 +0800 +@@ -48,12 +48,12 @@ + ip->ihl = (IPHDR_SIZE + optlen + 3) >> 2; + ip->tos = ip_tos; + +-#if defined OSTYPE_FREEBSD || defined OSTYPE_NETBSD || defined OSTYPE_BSDI +-/* FreeBSD */ ++#if defined OSTYPE_NETBSD || defined OSTYPE_BSDI + /* NetBSD */ + ip->tot_len = packetsize; + #else + /* Linux */ ++/* FreeBSD */ + /* OpenBSD */ + ip->tot_len = htons(packetsize); + #endif +@@ -73,13 +73,13 @@ + htons((unsigned short) src_id); + } + +-#if defined OSTYPE_FREEBSD || defined OSTYPE_NETBSD | defined OSTYPE_BSDI +-/* FreeBSD */ ++#if defined OSTYPE_NETBSD | defined OSTYPE_BSDI + /* NetBSD */ + ip->frag_off |= more_fragments; + ip->frag_off |= fragoff >> 3; + #else + /* Linux */ ++/* FreeBSD */ + /* OpenBSD */ + ip->frag_off |= htons(more_fragments); + ip->frag_off |= htons(fragoff >> 3); /* shift three flags bit */ diff --git a/net/hping-devel/files/patch-sendip.c b/net/hping-devel/files/patch-sendip.c deleted file mode 100644 index 872861983e5a..000000000000 --- a/net/hping-devel/files/patch-sendip.c +++ /dev/null @@ -1,33 +0,0 @@ ---- sendip.c.orig 2003-08-01 21:28:07.000000000 +0800 -+++ sendip.c 2015-12-22 23:16:39.296072000 +0800 -@@ -48,12 +48,12 @@ - ip->ihl = (IPHDR_SIZE + optlen + 3) >> 2; - ip->tos = ip_tos; - --#if defined OSTYPE_FREEBSD || defined OSTYPE_NETBSD || defined OSTYPE_BSDI --/* FreeBSD */ -+#if defined OSTYPE_NETBSD || defined OSTYPE_BSDI - /* NetBSD */ - ip->tot_len = packetsize; - #else - /* Linux */ -+/* FreeBSD */ - /* OpenBSD */ - ip->tot_len = htons(packetsize); - #endif -@@ -73,13 +73,13 @@ - htons((unsigned short) src_id); - } - --#if defined OSTYPE_FREEBSD || defined OSTYPE_NETBSD | defined OSTYPE_BSDI --/* FreeBSD */ -+#if defined OSTYPE_NETBSD | defined OSTYPE_BSDI - /* NetBSD */ - ip->frag_off |= more_fragments; - ip->frag_off |= fragoff >> 3; - #else - /* Linux */ -+/* FreeBSD */ - /* OpenBSD */ - ip->frag_off |= htons(more_fragments); - ip->frag_off |= htons(fragoff >> 3); /* shift three flags bit */ -- cgit v1.2.3