From cea084eeeb14c460e0c26154c43a480d95ea95bf Mon Sep 17 00:00:00 2001 From: Mathieu Arnold Date: Wed, 28 Dec 2016 11:40:00 +0000 Subject: MFH: r429739 Really fix on 11+. PR: 212283 Submitted by: ae Sponsored by: Absolight --- net/ntraceroute/Makefile | 12 +++++++++--- net/ntraceroute/files/patch-traceroute.c | 12 ------------ 2 files changed, 9 insertions(+), 15 deletions(-) diff --git a/net/ntraceroute/Makefile b/net/ntraceroute/Makefile index 965c7ac5015d..f54f8ccf4802 100644 --- a/net/ntraceroute/Makefile +++ b/net/ntraceroute/Makefile @@ -3,7 +3,7 @@ PORTNAME= ntraceroute PORTVERSION= 6.4.2 -PORTREVISION= 2 +PORTREVISION= 3 CATEGORIES= net MASTER_SITES= NETBSD/traceroute-nanog \ http://mirrors.rit.edu/zi/ @@ -22,11 +22,17 @@ EXTRACT_AFTER_ARGS= . PLIST_FILES= sbin/${PORTNAME} +.include + +.if ${OSVERSION} >= 1100030 +BUILD_FLAGS= -DBYTESWAP_IP_FLAGS -DBYTESWAP_IP_LEN +.endif + do-build: - ${CC} -o ${WRKSRC}/${PORTNAME} -lm \ + ${CC} ${BUILD_FLAGS} -o ${WRKSRC}/${PORTNAME} -lm \ ${WRKSRC}/${DISTFILES} do-install: ${INSTALL_PROGRAM} ${WRKSRC}/${PORTNAME} ${STAGEDIR}${PREFIX}/sbin -.include +.include diff --git a/net/ntraceroute/files/patch-traceroute.c b/net/ntraceroute/files/patch-traceroute.c index 4c8d99e90854..e4e8c0dd459e 100644 --- a/net/ntraceroute/files/patch-traceroute.c +++ b/net/ntraceroute/files/patch-traceroute.c @@ -1,17 +1,5 @@ --- traceroute.c.orig 2016-09-02 21:07:07 UTC +++ traceroute.c -@@ -2,6 +2,11 @@ - /* - * STILL BROKEN: traceroute -g on linux (LSRR) - */ -+#include -+#if __FreeBSD_version >= 1100030 -+#define BYTESWAP_IP_FLAGS -+#define BYTESWAP_IP_LEN -+#endif - #define TRACE_TOS 1 - #define SPRAY - #define FIXT @@ -798,7 +803,7 @@ struct opacket { struct icmp icmp_probe; } ip_payload; -- cgit v1.2.3