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

Peter Korsgaard peter at korsgaard.com
Tue Oct 15 09:53:37 UTC 2013


>>>>> "Peter" == Peter Korsgaard <peter at korsgaard.com> writes:

Hi,

 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.

 Peter> I noticed another critical issue on ARM EABI. The use of
 Peter> __LONG_LONG_PAIR for the offset doesn't take alignment requirement of
 Peter> 64bit parameters on EABI into consideration, so the offset is off by one
 Peter> register :/

 Peter> https://lkml.org/lkml/2006/1/12/175

 Peter> How should that be handled?

Anybody?

-- 
Bye, Peter Korsgaard


More information about the uClibc mailing list