On Mon, Nov 29, 2010 at 06:38:57AM -0500, Mike Frysinger wrote: > On Monday, November 29, 2010 05:53:36 Graham Gower wrote: > > On 29 November 2010 20:50, Karel Zak wrote: > > > On Mon, Nov 29, 2010 at 12:05:24PM +1030, Graham Gower wrote: > > >> uClibc may be built without large file support (no llseek, lseek64, > > >> etc). > > >> > > >> The below patch fixes things for me in this case. Patch is against 2.17, > > >> but it doesn't look like the code has changed recently. > > >> > > >> --- util-linux-ng-2.17/shlibs/blkid/src/llseek.c.orig 2010-11-29 > > >> 11:31:49.000000000 +1030 +++ > > >> util-linux-ng-2.17/shlibs/blkid/src/llseek.c 2010-11-29 > > >> 11:52:07.000000000 +1030 @@ -28,7 +28,7 @@ > > >> > > >> #include "blkidP.h" > > >> > > >> -#ifdef __linux__ > > >> +#if defined(__linux__) && !(defined(__UCLIBC__) && > > >> !defined(__USE_FILE_OFFSET64)) > > > > > > Not sure... > > > > > >> #if defined(HAVE_LSEEK64) && defined(HAVE_LSEEK64_PROTOTYPE) || > > >> defined(__UCLIBC__) > > > > > > ... wouldn't be enough to use: > > > > > > #if defined(HAVE_LSEEK64) && defined(HAVE_LSEEK64_PROTOTYPE) || \ > > > defined(__UCLIBC__) && defined(__USE_FILE_OFFSET64) > > > > > > ? > > > > > > The code inside __linux__ conditional block seems useful > > > independently on libc, it calls llseek syscall directly. > > > > > > Unfortunately, I don't have uClib to test it. Mike, any comment? > > > > No. There is no llseek in the uClibc I have built. Hence falling back > > to lseek was the route I took. > > Karel said "syscall", not "library function". i think his counter suggestion > should work. although i'm not sure why this file checks __UCLIBC__ at all if > there are proper configure tests for lseek64/llseek ... Good point. The __UCLIBC__ is unnecessary legacy from time when HAVE_LSEEK64* macros wasn't properly defined. I've fixed this problem few months ago, but I forgot to remove the __UCLIBC__ check. My mistake. > testing against a uClibc w/LFS enabled shows that both HAVE_LSEEK64 and > HAVE_LSEEK64_PROTOTYPE are defined as expected. i dont have a toolchain w/LFS > disabled atm, but i could build up one if necessary. > so my counter-counter-proposal is: > > --- a/shlibs/blkid/src/llseek.c > +++ b/shlibs/blkid/src/llseek.c > @@ -30,7 +30,7 @@ > > #ifdef __linux__ > > -#if defined(HAVE_LSEEK64) && defined(HAVE_LSEEK64_PROTOTYPE) || defined(__UCLIBC__) > +#if defined(HAVE_LSEEK64) && defined(HAVE_LSEEK64_PROTOTYPE) Applied, thanks. Karel -- Karel Zak <kzak@xxxxxxxxxx> http://karelzak.blogspot.com -- To unsubscribe from this list: send the line "unsubscribe util-linux-ng" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html