diff options
author | "Steven J. Hill" <sjhill@realitydiluted.com> | 2005-12-02 01:50:58 +0000 |
---|---|---|
committer | "Steven J. Hill" <sjhill@realitydiluted.com> | 2005-12-02 01:50:58 +0000 |
commit | 6fd3ac79613c9e1832513b0f614860be2735993f (patch) | |
tree | 5f6bfb750aed249d5951d84de663c03f9e4b82dd /libc/sysdeps/linux/common/posix_fadvise.c | |
parent | 9acef89e60381a298801e4b221d66b1538072b28 (diff) | |
download | uClibc-alpine-6fd3ac79613c9e1832513b0f614860be2735993f.tar.bz2 uClibc-alpine-6fd3ac79613c9e1832513b0f614860be2735993f.tar.xz |
Merge from trunk.
Diffstat (limited to 'libc/sysdeps/linux/common/posix_fadvise.c')
-rw-r--r-- | libc/sysdeps/linux/common/posix_fadvise.c | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/libc/sysdeps/linux/common/posix_fadvise.c b/libc/sysdeps/linux/common/posix_fadvise.c index a1888134b..52fc35700 100644 --- a/libc/sysdeps/linux/common/posix_fadvise.c +++ b/libc/sysdeps/linux/common/posix_fadvise.c @@ -8,22 +8,20 @@ * GNU Library General Public License (LGPL) version 2 or later. */ +/* need to hide the posix_fadvise64 prototype or the weak_alias() + * will fail when __NR_fadvise64_64 doesnt exist */ +#define posix_fadvise64 __hide_posix_fadvise64 #include "syscalls.h" #include <fcntl.h> +#undef posix_fadvise64 #ifdef __NR_fadvise64 -#define __NR___syscall_fadvise64 __NR_fadvise64 -_syscall4(int, __syscall_fadvise64, int, fd, off_t, offset, +#define __NR_posix_fadvise __NR_fadvise64 +_syscall4(int, posix_fadvise, int, fd, off_t, offset, off_t, len, int, advice); -int __libc_posix_fadvise(int fd, off_t offset, off_t len, int advice) -{ - return (__syscall_fadvise64(fd, offset, len, advice)); -} -weak_alias(__libc_posix_fadvise, posix_fadvise); -#if defined __UCLIBC_HAS_LFS__ && !defined __NR_fadvise64_64 && \ - !defined __USE_LARGEFILE64 -weak_alias(__libc_posix_fadvise, posix_fadvise64); +#if defined __UCLIBC_HAS_LFS__ && !defined __NR_fadvise64_64 +weak_alias(posix_fadvise, posix_fadvise64); #endif #else |