summaryrefslogtreecommitdiff
path: root/libc/sysdeps/linux/powerpc
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2009-08-30 11:42:28 -0700
committerKhem Raj <raj.khem@gmail.com>2009-08-30 11:42:28 -0700
commitde60cf611b1b7dcad53f21728360dff1792ab4fc (patch)
tree626d2bde51b2bf5cd5913a69795d4ca53417927a /libc/sysdeps/linux/powerpc
parent150d2d2188535b8b9ad504cee80da7b502fd2722 (diff)
Build posix_fadvice{64} only when UCLIBC_HAS_ADVANCED_REALTIME is set.
Right now for ARM, MIPS, Xtensa and powerpc posix_fadvise routines are included conditionally. They should only be enabled when UCLIBC_HAS_ADVANCED_REALTIME is set. Also fix code style in powerpc/posix_fadvise64.c Signed-off-by: Khem Raj <raj.khem@gmail.com>
Diffstat (limited to 'libc/sysdeps/linux/powerpc')
-rw-r--r--libc/sysdeps/linux/powerpc/Makefile.arch6
-rw-r--r--libc/sysdeps/linux/powerpc/posix_fadvise64.c5
2 files changed, 7 insertions, 4 deletions
diff --git a/libc/sysdeps/linux/powerpc/Makefile.arch b/libc/sysdeps/linux/powerpc/Makefile.arch
index 2034f5393..8c7fc2de6 100644
--- a/libc/sysdeps/linux/powerpc/Makefile.arch
+++ b/libc/sysdeps/linux/powerpc/Makefile.arch
@@ -5,7 +5,11 @@
# Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
#
-CSRC := __syscall_error.c pread_write.c ioctl.c posix_fadvise.c posix_fadvise64.c
+CSRC := __syscall_error.c pread_write.c ioctl.c
+
+ifeq ($(UCLIBC_HAS_ADVANCED_REALTIME),y)
+CSRC += posix_fadvise.c posix_fadvise64.c
+endif
SSRC := \
__longjmp.S setjmp.S bsd-setjmp.S bsd-_setjmp.S brk.S \
diff --git a/libc/sysdeps/linux/powerpc/posix_fadvise64.c b/libc/sysdeps/linux/powerpc/posix_fadvise64.c
index 159bdfad1..2c7d207c6 100644
--- a/libc/sysdeps/linux/powerpc/posix_fadvise64.c
+++ b/libc/sysdeps/linux/powerpc/posix_fadvise64.c
@@ -30,9 +30,8 @@ int posix_fadvise64(int fd, __off64_t offset, __off64_t len, int advise)
if (len != (off_t) len)
return EOVERFLOW;
INTERNAL_SYSCALL_DECL (err);
- int ret = INTERNAL_SYSCALL (posix_fadvise64, err, 6, fd, 0,
- __LONG_LONG_PAIR ((long) (offset >> 32),
- (long) offset),
+ int ret = INTERNAL_SYSCALL (posix_fadvise64, err, 6, fd, 0,
+ __LONG_LONG_PAIR ((long) (offset >> 32), (long) offset),
(off_t) len, advise);
if (!INTERNAL_SYSCALL_ERROR_P (ret, err))
return 0;