From: Ulrich Drepper Date: Wed, 15 Apr 2009 17:10:28 +0000 (+0000) Subject: * sysdeps/unix/sysv/linux/wordsize-64/fallocate.c: Likewise. X-Git-Tag: cvs/fedora-glibc-20090416T0610 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e775ec11c449ab573ad4357b6e48a9aada983e0f;p=thirdparty%2Fglibc.git * sysdeps/unix/sysv/linux/wordsize-64/fallocate.c: Likewise. --- diff --git a/ChangeLog b/ChangeLog index bf3e96f4c0e..5fa4d3d371b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -22,6 +22,7 @@ * sysdeps/unix/sysv/linux/fallocate.c: Handle old kernel headers. * sysdeps/unix/sysv/linux/fallocate64.c: Likewise. + * sysdeps/unix/sysv/linux/wordsize-64/fallocate.c: Likewise. 2009-03-25 Andrew Stubbs diff --git a/sysdeps/unix/sysv/linux/fallocate.c b/sysdeps/unix/sysv/linux/fallocate.c index 116f00046ed..dc2b4e92ca8 100644 --- a/sysdeps/unix/sysv/linux/fallocate.c +++ b/sysdeps/unix/sysv/linux/fallocate.c @@ -25,7 +25,7 @@ int fallocate (int fd, int mode, __off_t offset, __off_t len) { -#ifndef __NR_fallocate +#ifdef __NR_fallocate return INLINE_SYSCALL (fallocate, 6, fd, mode, __LONG_LONG_PAIR (offset >> 31, offset), __LONG_LONG_PAIR (len >> 31, len)); diff --git a/sysdeps/unix/sysv/linux/fallocate64.c b/sysdeps/unix/sysv/linux/fallocate64.c index 2fbe988910a..ebcaf671b3e 100644 --- a/sysdeps/unix/sysv/linux/fallocate64.c +++ b/sysdeps/unix/sysv/linux/fallocate64.c @@ -25,7 +25,7 @@ int __fallocate64_l64 (int fd, int mode, __off64_t offset, __off64_t len) { -#ifndef __NR_fallocate +#ifdef __NR_fallocate return INLINE_SYSCALL (fallocate, 6, fd, mode, __LONG_LONG_PAIR ((long int) (offset >> 32), (long int) offset), diff --git a/sysdeps/unix/sysv/linux/wordsize-64/fallocate.c b/sysdeps/unix/sysv/linux/wordsize-64/fallocate.c index 0eabab9781e..3e8954f0b7c 100644 --- a/sysdeps/unix/sysv/linux/wordsize-64/fallocate.c +++ b/sysdeps/unix/sysv/linux/wordsize-64/fallocate.c @@ -25,6 +25,11 @@ int fallocate (int fd, int mode, __off_t offset, __off_t len) { +#ifdef __NR_fallocate return INLINE_SYSCALL (fallocate, 4, fd, mode, offset, len); +#else + __set_errno (ENOSYS); + return -1; +#endif } strong_alias (fallocate, fallocate64)