svn commit: r470450 - head/net-p2p/torrentcheck
Alexey Dokuchaev
danfe at FreeBSD.org
Sun May 20 10:46:24 UTC 2018
Author: danfe
Date: Sun May 20 10:46:23 2018
New Revision: 470450
URL: https://svnweb.freebsd.org/changeset/ports/470450
Log:
Fix checking of torrents which contain files larger than 2^31 - 1 bytes.
By default it detects file size by fseek()'ing to its end and ftell()'ing
current position, and these functions take `long offset' as an argument.
It is sufficient on 64-bit architectures where sizeof(long) is 8, but not
so on 32-bit ones where it is 4.
Make it work everywhere by building with -DUSE_FTELLO so it uses fseeko(3)
and ftello(3) functions which take `off_t offset'.
Tested on: i386, powerpc
Modified:
head/net-p2p/torrentcheck/Makefile
Modified: head/net-p2p/torrentcheck/Makefile
==============================================================================
--- head/net-p2p/torrentcheck/Makefile Sun May 20 10:24:46 2018 (r470449)
+++ head/net-p2p/torrentcheck/Makefile Sun May 20 10:46:23 2018 (r470450)
@@ -3,6 +3,7 @@
PORTNAME= torrentcheck
PORTVERSION= 1.00
+PORTREVISION= 1
CATEGORIES= net-p2p
MASTER_SITES= SF/${PORTNAME}
DISTFILES= ${DISTNAME}${EXTRACT_SUFX} readme.txt
@@ -26,8 +27,8 @@ post-patch:
@${REINPLACE_CMD} -e '/malloc\.h/d' ${WRKSRC}/torrentcheck.c
do-build:
- cd ${WRKSRC} && ${CC} ${CFLAGS} ${CPPFLAGS} -o ${PORTNAME} \
- sha1.c torrentcheck.c
+ cd ${WRKSRC} && ${CC} ${CFLAGS} ${CPPFLAGS} -DUSE_FTELLO \
+ -o ${PORTNAME} sha1.c torrentcheck.c
do-install:
${INSTALL_PROGRAM} ${WRKSRC}/${PORTNAME} ${STAGEDIR}${PREFIX}/bin
More information about the svn-ports-all
mailing list