Library net/libnet10 defines structures for contents of network packets.

Fields of the packets have fixed size according to the respective protocol
definitions, but the library uses type u_long for some of the 32bit fields.
This is a problem on amd64 architecture, where type long has 64 bits. On
amd64, libnet creates packets with bad contents.

PR:             ports/122571
Submitted by:   Martin Beran <mb@tns.cz>
This commit is contained in:
Philip M. Gollucci 2009-06-11 20:08:35 +00:00
parent a3249cb3a8
commit fe8fe8c552
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=235594

View file

@ -23,6 +23,13 @@ WRKSRC= ${WRKDIR}/Libnet-${PORTVERSION}
DOCSDIR= ${PREFIX}/share/doc/${PORTNAME}${PKGNAMESUFFIX}
MAN3= libnet${PKGNAMESUFFIX}.3
.include <bsd.port.pre.mk>
.if ${ARCH} == "amd64"
post-patch:
find ${WRKDIR} -name '*.[hc]' | xargs ${REINPLACE_CMD} -e 's/long/int/g'
.endif
post-install:
${INSTALL_MAN} ${WRKSRC}/doc/libnet.3 \
${MANPREFIX}/man/man3/libnet${PKGNAMESUFFIX}.3
@ -39,4 +46,4 @@ post-install:
.endfor
.endif
.include <bsd.port.mk>
.include <bsd.port.post.mk>