diff options
author | Matt Fischer <matt.fischer@garmin.com> | 2009-08-21 15:45:17 -0500 |
---|---|---|
committer | Garmin Android technology group <android@garmin.com> | 2010-02-12 16:13:46 -0600 |
commit | e31c1d0b48b4654d3562fc6c9dd648d72356449e (patch) | |
tree | b777e461f0d2556bc5183a574ef4e67191347c54 | |
parent | 95604529ec25fe7923ba88312c590f38aa5e3d9e (diff) | |
download | bionic-e31c1d0b48b4654d3562fc6c9dd648d72356449e.zip bionic-e31c1d0b48b4654d3562fc6c9dd648d72356449e.tar.gz bionic-e31c1d0b48b4654d3562fc6c9dd648d72356449e.tar.bz2 |
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.
-rw-r--r-- | libc/unistd/pread.c | 4 | ||||
-rw-r--r-- | libc/unistd/pwrite.c | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/libc/unistd/pread.c b/libc/unistd/pread.c index d2f71f7..b55623e 100644 --- a/libc/unistd/pread.c +++ b/libc/unistd/pread.c @@ -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); } diff --git a/libc/unistd/pwrite.c b/libc/unistd/pwrite.c index 5adf40a..ea080d2 100644 --- a/libc/unistd/pwrite.c +++ b/libc/unistd/pwrite.c @@ -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); } |