Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 20 May 2018 10:46:23 +0000 (UTC)
From:      Alexey Dokuchaev <danfe@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r470450 - head/net-p2p/torrentcheck
Message-ID:  <201805201046.w4KAkNBe058187@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201805201046.w4KAkNBe058187>