1
0
Fork 0
mirror of https://github.com/transmission/transmission synced 2025-02-20 21:26:53 +00:00

(trunk libT) a test commit -- possible fseek fix for Rabbitbunny

This commit is contained in:
Charles Kerr 2009-09-09 03:23:50 +00:00
parent 9a02f9e48e
commit 9af75365d2
2 changed files with 7 additions and 2 deletions

View file

@ -93,6 +93,7 @@ PKG_CHECK_MODULES(LIBCURL, [libcurl >= $CURL_MINIMUM])
AC_PATH_ZLIB
AC_SYS_LARGEFILE
AC_CHECK_FUNCS([lseek64])
dnl ----------------------------------------------------------------------------

View file

@ -10,6 +10,10 @@
* $Id$
*/
#ifdef HAVE_LSEEK64
#define _LARGEFILE64_SOURCE
#endif
#include <assert.h>
#include <errno.h>
#include <stdlib.h> /* realloc */
@ -51,9 +55,9 @@ enum { TR_IO_READ, TR_IO_WRITE };
int64_t
tr_lseek( int fd, int64_t offset, int whence )
{
#if defined(_LARGEFILE_SOURCE)
#if defined( HAVE_LSEEK64 )
return lseek64( fd, (off64_t)offset, whence );
#elif defined(WIN32)
#elif defined( WIN32 )
return _lseeki64( fd, offset, whence );
#else
return lseek( fd, (off_t)offset, whence );