summaryrefslogtreecommitdiff
path: root/sysdeps/unix/sysv/linux/i386/fallocate64.c
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/unix/sysv/linux/i386/fallocate64.c')
-rw-r--r--sysdeps/unix/sysv/linux/i386/fallocate64.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/sysdeps/unix/sysv/linux/i386/fallocate64.c b/sysdeps/unix/sysv/linux/i386/fallocate64.c
index 4998f5e644..85f315c9b6 100644
--- a/sysdeps/unix/sysv/linux/i386/fallocate64.c
+++ b/sysdeps/unix/sysv/linux/i386/fallocate64.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
fallocate64 (int fd, int mode, __off64_t offset, __off64_t len)
{
+#ifdef __NR_fallocate
return __call_fallocate (fd, mode, offset, len);
+#else
+ __set_errno (ENOSYS);
+ return -1;
+#endif
}