Fix pread()/pwrite() stubs

On ARM EABI, 64-bit function parameters must be aligned
to an even/odd register pair.  The weird way these stubs
were written (using separate lo/hi parameters) prevented
this alignment from being enforced by the compiler.
This commit is contained in:
Matt Fischer 2009-08-21 15:45:17 -05:00 committed by Garmin Android technology group
parent 95604529ec
commit e31c1d0b48
2 changed files with 4 additions and 4 deletions

View File

@ -25,10 +25,10 @@
#include <sys/types.h>
#include <unistd.h>
extern int __pread64(int fd, void *buf, size_t nbytes, off_t lo, off_t hi);
extern int __pread64(int fd, void *buf, size_t nbytes, loff_t offset);
ssize_t pread(int fd, void *buf, size_t nbytes, off_t offset)
{
return __pread64(fd, buf, nbytes, offset, 0);
return __pread64(fd, buf, nbytes, offset);
}

View File

@ -28,10 +28,10 @@
#include <sys/types.h>
#include <unistd.h>
extern int __pwrite64(int fd, void *buf, size_t nbytes, off_t lo, off_t hi);
extern int __pwrite64(int fd, void *buf, size_t nbytes, loff_t offset);
ssize_t pwrite(int fd, void *buf, size_t nbytes, off_t offset)
{
return __pwrite64(fd, buf, nbytes, offset, 0);
return __pwrite64(fd, buf, nbytes, offset);
}