[PATCH-0.9.33] common/pread_write.c: unbreak on archs without __NR_pread64

Mike Frysinger vapier at gentoo.org
Tue Oct 15 20:10:06 UTC 2013


On Friday 04 October 2013 17:45:20 Peter Korsgaard wrote:
> >>>>> "Peter" == Peter Korsgaard <peter at korsgaard.com> writes:
>  Peter> Some archs (avr32 in particular) still doesn't define __NR_pread64,
> so Peter> we should fall back to __NR_pread if it isn't available.
> 
>  Peter> The code nicely checks for it, but then ends up hard coding the
> syscall Peter> to use __NR_pread64 afterwards, rendering the check
> useless. Fix it by Peter> using the result of the test instead.
> 
> I noticed another critical issue on ARM EABI. The use of
> __LONG_LONG_PAIR for the offset doesn't take alignment requirement of
> 64bit parameters on EABI into consideration, so the offset is off by one
> register :/
> 
> https://lkml.org/lkml/2006/1/12/175
> 
> How should that be handled?

i introduced __UCLIBC_SYSCALL_ALIGN_64BIT__ to handle this case.  and the 
pread/pwrite logic takes that into account.  do you have information to 
indicate it isn't working ?

your e-mail client still sucks btw
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.busybox.net/pipermail/uclibc/attachments/20131015/6b45123d/attachment.asc>


More information about the uClibc mailing list