summaryrefslogtreecommitdiff
path: root/sysdeps/unix/sysv/linux/i386/fallocate.c
diff options
context:
space:
mode:
authorAndreas Schwab <schwab@redhat.com>2009-11-30 14:53:29 +0100
committerAndreas Schwab <schwab@redhat.com>2009-11-30 14:54:41 +0100
commit488fb43a499982e99915c78bb70f04357ac37463 (patch)
treee356d0f1d327ed3de4a9d5abec1edf346070aa32 /sysdeps/unix/sysv/linux/i386/fallocate.c
parenteab709096f23a4511adfc547450a83008eae5fb2 (diff)
parent20af204581e1ba42738c1bfb69cc2f5350f4ffa4 (diff)
Merge branch 'release/2.11/master' into fedora/2.11/master
Diffstat (limited to 'sysdeps/unix/sysv/linux/i386/fallocate.c')
-rw-r--r--sysdeps/unix/sysv/linux/i386/fallocate.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/sysdeps/unix/sysv/linux/i386/fallocate.c b/sysdeps/unix/sysv/linux/i386/fallocate.c
index 7a943e44c0..14e788386c 100644
--- a/sysdeps/unix/sysv/linux/i386/fallocate.c
+++ b/sysdeps/unix/sysv/linux/i386/fallocate.c
@@ -16,6 +16,7 @@
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */
+#include <errno.h>
#include <fcntl.h>
#include <sysdep.h>
@@ -28,5 +29,10 @@ extern int __call_fallocate (int fd, int mode, __off64_t offset, __off64_t len)
int
fallocate (int fd, int mode, __off_t offset, __off_t len)
{
+#ifdef __NR_fallocate
return __call_fallocate (fd, mode, offset, len);
+#else
+ __set_errno (ENOSYS);
+ return -1;
+#endif
}