Really fix on 11+.

PR:		212283
Submitted by:	ae
Sponsored by:	Absolight
This commit is contained in:
Mathieu Arnold 2016-12-28 11:38:12 +00:00
parent 5bd9961141
commit fedfe01227
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=429739
2 changed files with 9 additions and 15 deletions

View File

@ -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 <bsd.port.pre.mk>
.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 <bsd.port.mk>
.include <bsd.port.post.mk>

View File

@ -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 <string.h>
+#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;