[PATCH] Add posix_fadvise and posix_fadvise64 for powerpc

Bernhard Reutner-Fischer rep.dot.nop at gmail.com
Sun Aug 30 13:00:29 UTC 2009


On Sun, Aug 30, 2009 at 01:05:16AM -0700, Khem Raj wrote:
>On (30/08/09 00:33), Khem Raj wrote:
>> The syscall is having different number of params
>> and in one case the parameters are passed in differently.
>> This patch add powerpc specific versions of these
>> functions.
>
>Actually didnt notice that I sent a wrong patch. Here is the one I
>should have sent

>Index: git/libc/sysdeps/linux/powerpc/posix_fadvise64.c

>+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,

Please keep C89 compatibility if possible (like here).

>Index: git/libc/sysdeps/linux/powerpc/Makefile.arch
>===================================================================
>--- git.orig/libc/sysdeps/linux/powerpc/Makefile.arch	2009-08-27 15:06:12.000000000 -0700
>+++ git/libc/sysdeps/linux/powerpc/Makefile.arch	2009-08-30 00:43:58.750009279 -0700
>@@ -5,7 +5,7 @@
> # Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
> #
> 
>-CSRC := __syscall_error.c pread_write.c ioctl.c
>+CSRC := __syscall_error.c pread_write.c ioctl.c posix_fadvise.c posix_fadvise64.c

these are UCLIBC_HAS_ADVANCED_REALTIME specific


More information about the uClibc mailing list