2009-03-17 Ryan S. Arnold <rsa@us.ibm.com>
authorUlrich Drepper <drepper@redhat.com>
Wed, 15 Apr 2009 00:39:57 +0000 (00:39 +0000)
committerUlrich Drepper <drepper@redhat.com>
Wed, 15 Apr 2009 00:39:57 +0000 (00:39 +0000)
            Ulrich Drepper  <drepper@redhat.com>

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

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

index 043ffbb..2af50a0 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+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.
+
 2009-03-25  Andrew Stubbs  <ams@codesourcery.com>
 
        * sysdeps/sh/libc-tls.c: New file.
index a45b0f8..116f000 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 601a70b..2fbe988 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
 }