diff options
author | Ulrich Drepper <drepper@redhat.com> | 2009-04-15 00:39:57 +0000 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 2009-04-15 00:39:57 +0000 |
commit | 353f210707092e3e57418b4954888f2d15cc3da3 (patch) | |
tree | 37826b8b00cca61b21e1171e5f75b91de1d2fe1d | |
parent | fc0c57057e03eb2131722619a46728562adf0db3 (diff) | |
download | glibc-353f210707092e3e57418b4954888f2d15cc3da3.tar.gz glibc-353f210707092e3e57418b4954888f2d15cc3da3.tar.xz glibc-353f210707092e3e57418b4954888f2d15cc3da3.zip |
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.
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | sysdeps/unix/sysv/linux/fallocate.c | 5 | ||||
-rw-r--r-- | sysdeps/unix/sysv/linux/fallocate64.c | 5 |
3 files changed, 16 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog index 043ffbbde4..2af50a0a43 100644 --- 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. diff --git a/sysdeps/unix/sysv/linux/fallocate.c b/sysdeps/unix/sysv/linux/fallocate.c index a45b0f831d..116f00046e 100644 --- a/sysdeps/unix/sysv/linux/fallocate.c +++ b/sysdeps/unix/sysv/linux/fallocate.c @@ -25,7 +25,12 @@ 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 } diff --git a/sysdeps/unix/sysv/linux/fallocate64.c b/sysdeps/unix/sysv/linux/fallocate64.c index 601a70ba1f..2fbe988910 100644 --- a/sysdeps/unix/sysv/linux/fallocate64.c +++ b/sysdeps/unix/sysv/linux/fallocate64.c @@ -25,9 +25,14 @@ 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 } |