diff options
Diffstat (limited to 'sysdeps/unix/sysv/linux/posix_fadvise.c')
-rw-r--r-- | sysdeps/unix/sysv/linux/posix_fadvise.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/sysdeps/unix/sysv/linux/posix_fadvise.c b/sysdeps/unix/sysv/linux/posix_fadvise.c index 808fc865ed..30a6d9e5be 100644 --- a/sysdeps/unix/sysv/linux/posix_fadvise.c +++ b/sysdeps/unix/sysv/linux/posix_fadvise.c @@ -27,10 +27,14 @@ int posix_fadvise (int fd, off_t offset, off_t len, int advise) { #ifdef __NR_fadvise64 - return INLINE_SYSCALL (fadvise64, 5, fd, - __LONG_LONG_PAIR (offset >> 31, offset), len, advise); + INTERNAL_SYSCALL_DECL (err); + int ret = INTERNAL_SYSCALL (fadvise64, err, 5, fd, + __LONG_LONG_PAIR (offset >> 31, offset), len, + advise); + if (INTERNAL_SYSCALL_ERROR_P (ret, err)) + return INTERNAL_SYSCALL_ERRNO (ret, err); + return 0; #else - __set_errno (ENOSYS); - return -1; + return ENOSYS; #endif } |