]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
Handle old kernel headers with new fallocate patches.
authorRyan S. Arnold <rsa@us.ibm.com>
Fri, 24 Jul 2009 15:49:00 +0000 (10:49 -0500)
committerRyan Arnold <ryanarn@etna.rchland.ibm.com>
Fri, 24 Jul 2009 20:10:55 +0000 (15:10 -0500)
commit 353f210707092e3e57418b4954888f2d15cc3da3
Author: Ulrich Drepper <drepper@redhat.com>
Date:   Wed Apr 15 00:39:57 2009 +0000

2009-03-17  Ryan S. Arnold  <rsa@us.ibm.com>
            Ulrich Drepper  <drepper@redhat.com>

* sysdeps/unix/sysv/linux/fallocate.c: Handle old kernel headers.
* sysdeps/unix/sysv/linux/fallocate64.c: Likewise.

sysdeps/unix/sysv/linux/fallocate.c
sysdeps/unix/sysv/linux/fallocate64.c

index a45b0f831d3d80dcc3385a3bdcb11a95915d0cde..116f00046ed3d7f6228ea0ba513c7f8c9de9ef5a 100644 (file)
 int
 fallocate (int fd, int mode, __off_t offset, __off_t len)
 {
+#ifndef __NR_fallocate
   return INLINE_SYSCALL (fallocate, 6, fd, mode,
                         __LONG_LONG_PAIR (offset >> 31, offset),
                         __LONG_LONG_PAIR (len >> 31, len));
+#else
+  __set_errno (ENOSYS);
+  return -1;
+#endif
 }
index 601a70ba1fe8137097ea3c7b559426d8597c9b5b..2fbe988910affce478927cf7a710811675052215 100644 (file)
 int
 __fallocate64_l64 (int fd, int mode, __off64_t offset, __off64_t len)
 {
+#ifndef __NR_fallocate
   return INLINE_SYSCALL (fallocate, 6, fd, mode,
                         __LONG_LONG_PAIR ((long int) (offset >> 32),
                                           (long int) offset),
                         __LONG_LONG_PAIR ((long int) (len >> 32),
                                           (long int) len));
+#else
+  __set_errno (ENOSYS);
+  return -1;
+#endif
 }