Message ID | 5cb8c9327dd274cc0ce7f15c0faade7da4cbbeef.1388657774.git.baruch@tkos.co.il |
---|---|
State | Rejected, archived |
Headers | show |
On Thursday 02 January 2014 05:16:14 Baruch Siach wrote: > Commit ee84b8b400 (linux: posix_fadvise: use new SYSCALL_ALIGN_64BIT) > removed posix_fadvise implementation for xtensa, since xtensa does not > define __NR_fadvise64. Redefine __NR_fadvise64 as __NR_fadvise64_64 to > restore posix_fadvise. > > --- a/libc/sysdeps/linux/common/posix_fadvise.c > +++ b/libc/sysdeps/linux/common/posix_fadvise.c > @@ -10,6 +10,10 @@ > > #include <sys/syscall.h> > > +#if !defined(__NR_fadvise64) && defined(__NR_fadvise64_64) > +#define __NR_fadvise64 __NR_fadvise64_64 > +#endif > + > #ifdef __NR_fadvise64 > # include <fcntl.h> > # include <endian.h> NAK: fairly certain this doesn't actually work. the 64_64 version expects a 64bit argument (for 32bit arches like xtensa, that means 2 32bits), but this file only passes up on 32bit. -mike
diff --git a/libc/sysdeps/linux/common/posix_fadvise.c b/libc/sysdeps/linux/common/posix_fadvise.c index d3e1bd4e8bd0..951f2323013a 100644 --- a/libc/sysdeps/linux/common/posix_fadvise.c +++ b/libc/sysdeps/linux/common/posix_fadvise.c @@ -10,6 +10,10 @@ #include <sys/syscall.h> +#if !defined(__NR_fadvise64) && defined(__NR_fadvise64_64) +#define __NR_fadvise64 __NR_fadvise64_64 +#endif + #ifdef __NR_fadvise64 # include <fcntl.h> # include <endian.h>
Commit ee84b8b400 (linux: posix_fadvise: use new SYSCALL_ALIGN_64BIT) removed posix_fadvise implementation for xtensa, since xtensa does not define __NR_fadvise64. Redefine __NR_fadvise64 as __NR_fadvise64_64 to restore posix_fadvise. Cc: Mike Frysinger <vapier@gentoo.org> Signed-off-by: Baruch Siach <baruch@tkos.co.il> --- libc/sysdeps/linux/common/posix_fadvise.c | 4 ++++ 1 file changed, 4 insertions(+)