fix broken fallocate syscall in posix_fallocate
authorRich Felker <dalias@aerifal.cx>
Sat, 8 Sep 2012 04:26:46 +0000 (00:26 -0400)
committerRich Felker <dalias@aerifal.cx>
Sat, 8 Sep 2012 04:26:46 +0000 (00:26 -0400)
the syscall takes an extra flag argument which should be zero to meet
the POSIX requirements.

src/fcntl/posix_fallocate.c

index bd72624..80a65cb 100644 (file)
@@ -3,6 +3,6 @@
 
 int posix_fallocate(int fd, off_t base, off_t len)
 {
 
 int posix_fallocate(int fd, off_t base, off_t len)
 {
-       return -__syscall(SYS_fallocate, fd, __SYSCALL_LL_O(base),
+       return -__syscall(SYS_fallocate, fd, 0, __SYSCALL_LL_E(base),
                __SYSCALL_LL_E(len));
 }
                __SYSCALL_LL_E(len));
 }