aboutsummaryrefslogtreecommitdiff
path: root/net-p2p
diff options
context:
space:
mode:
authorAlexey Dokuchaev <danfe@FreeBSD.org>2018-05-20 10:46:23 +0000
committerAlexey Dokuchaev <danfe@FreeBSD.org>2018-05-20 10:46:23 +0000
commite252836800b74a079b3f6d196ae7b62f912ff84a (patch)
tree3af84f454415d429952fa0997a2ceaf9a981c20a /net-p2p
parent20ddbec58d35b63d09c31d4ccdcf9bb146d9deda (diff)
downloadports-e252836800b74a079b3f6d196ae7b62f912ff84a.tar.gz
ports-e252836800b74a079b3f6d196ae7b62f912ff84a.zip
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
Notes
Notes: svn path=/head/; revision=470450
Diffstat (limited to 'net-p2p')
-rw-r--r--net-p2p/torrentcheck/Makefile5
1 files changed, 3 insertions, 2 deletions
diff --git a/net-p2p/torrentcheck/Makefile b/net-p2p/torrentcheck/Makefile
index a53ba333e443..9624572c4fda 100644
--- a/net-p2p/torrentcheck/Makefile
+++ b/net-p2p/torrentcheck/Makefile
@@ -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