From 899a2731262c4321f44a0faecf4134f6b6eacc3d Mon Sep 17 00:00:00 2001 From: Bernhard Reutner-Fischer Date: Mon, 26 Mar 2012 11:25:33 +0200 Subject: stubs: unified from future Future branch extends stubs with ret_enosys_stub. Resolve conflicts, and use superset of future and current master. Adjust posix_fadvise* accordingly. Upon future merge, pick this master version as the final state. Signed-off-by: Bernhard Reutner-Fischer --- libc/sysdeps/linux/common/posix_fadvise.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) (limited to 'libc/sysdeps/linux/common/posix_fadvise.c') 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 -- cgit v1.2.3