From a9d0190a0eddc1aacabbf9e89cfa2e7e70db0d00 Mon Sep 17 00:00:00 2001 From: Charles Kerr Date: Tue, 14 Dec 2010 14:41:23 +0000 Subject: [PATCH] (trunk libT) #3826 "all data fails its checksum test in uClibc 0.9.27" -- refinement of r11530 based on research by iz0bbz to find which version of uClibc added a fix. --- libtransmission/fdlimit.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/libtransmission/fdlimit.c b/libtransmission/fdlimit.c index f68a4dcd1..5c2f263e0 100644 --- a/libtransmission/fdlimit.c +++ b/libtransmission/fdlimit.c @@ -201,9 +201,16 @@ preallocateFileFull( const char * filename, uint64_t length ) /* https://trac.transmissionbt.com/ticket/3826 */ #ifdef __UCLIBC__ +#define TR_UCLIBC_CHECK_VERSION(major,minor,micro) \ + (__UCLIBC_MAJOR__ > (major) || \ + (__UCLIBC_MAJOR__ == (major) && __UCLIBC_MINOR__ > (minor)) || \ + (__UCLIBC_MAJOR__ == (major) && __UCLIBC_MINOR__ == (minor) && \ + __UCLIBC_SUBLEVEL__ >= (micro))) +#if !TR_UCLIBC_CHECK_VERSION(0,9,28) #undef HAVE_PREAD #undef HAVE_PWRITE #endif +#endif #ifdef SYS_DARWIN #define HAVE_PREAD -- 2.40.0