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 bd726242d325a461d66ad505e57f5db5f5ca7351..80a65cbfd62e9148336d58aec3587fe53bbfb610 100644 (file)
@@ -3,6 +3,6 @@
 
 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));
 }