Re: blkid_llseek fix for uClibc without large file support

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Nov 29, 2010 at 12:05:24PM +1030, Graham Gower wrote:
> Hi,
> 
> 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.
> 
> -Graham
> 
> --- 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?


 I'm not sure if we still need llseek.c at all  -- it should
 be enough to follow standard system headers in year 2010...

    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


[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux