summaryrefslogtreecommitdiff
path: root/libc/sysdeps/linux/common/posix_fadvise.c
diff options
context:
space:
mode:
Diffstat (limited to 'libc/sysdeps/linux/common/posix_fadvise.c')
-rw-r--r--libc/sysdeps/linux/common/posix_fadvise.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/libc/sysdeps/linux/common/posix_fadvise.c b/libc/sysdeps/linux/common/posix_fadvise.c
index 17831c201..84b7c40d0 100644
--- a/libc/sysdeps/linux/common/posix_fadvise.c
+++ b/libc/sysdeps/linux/common/posix_fadvise.c
@@ -15,21 +15,17 @@
#define __NR_posix_fadvise __NR_fadvise64
int posix_fadvise(int fd, off_t offset, off_t len, int advice)
{
+ int ret;
INTERNAL_SYSCALL_DECL(err);
- int ret = (int) (INTERNAL_SYSCALL(posix_fadvise, err, 5, fd,
+ ret = (int) (INTERNAL_SYSCALL(posix_fadvise, err, 5, fd,
__LONG_LONG_PAIR (offset >> 31, offset), len, advice));
if (INTERNAL_SYSCALL_ERROR_P (ret, err))
return INTERNAL_SYSCALL_ERRNO (ret, err);
return 0;
}
-#if defined __UCLIBC_HAS_LFS__ && !defined __NR_fadvise64_64
+# if defined __UCLIBC_HAS_LFS__ && !defined __NR_fadvise64_64
strong_alias(posix_fadvise,posix_fadvise64)
-#endif
+# endif
-#elif defined __UCLIBC_HAS_STUBS__
-int posix_fadvise(int fd attribute_unused, off_t offset attribute_unused, off_t len attribute_unused, int advice attribute_unused)
-{
- return ENOSYS;
-}
#endif