diff options
Diffstat (limited to 'main/libc0.9.32/posix_fallocate-fix.patch')
-rw-r--r-- | main/libc0.9.32/posix_fallocate-fix.patch | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/main/libc0.9.32/posix_fallocate-fix.patch b/main/libc0.9.32/posix_fallocate-fix.patch new file mode 100644 index 0000000000..3ff28a49e2 --- /dev/null +++ b/main/libc0.9.32/posix_fallocate-fix.patch @@ -0,0 +1,29 @@ +--- ./libc/sysdeps/linux/common/posix_fallocate.c.orig ++++ ./libc/sysdeps/linux/common/posix_fallocate.c +@@ -22,11 +22,10 @@ + uint32_t off_low = offset; + uint32_t len_low = len; + /* may assert that these >>31 are 0 */ +- uint32_t zero = 0; + INTERNAL_SYSCALL_DECL(err); + ret = (int) (INTERNAL_SYSCALL(fallocate, err, 6, fd, 0, +- __LONG_LONG_PAIR (zero, off_low), +- __LONG_LONG_PAIR (zero, len_low))); ++ __LONG_LONG_PAIR (0, off_low), ++ __LONG_LONG_PAIR (0, len_low))); + # elif __WORDSIZE == 64 + INTERNAL_SYSCALL_DECL(err); + ret = (int) (INTERNAL_SYSCALL(fallocate, err, 4, fd, 0, offset, len)); +diff --git a/libc/sysdeps/linux/i386/bits/syscalls.h b/libc/sysdeps/linux/i386/bits/syscalls.h +index 9fb4f35..566b5ac 100644 +--- a/libc/sysdeps/linux/i386/bits/syscalls.h ++++ b/libc/sysdeps/linux/i386/bits/syscalls.h +@@ -136,7 +136,7 @@ __asm__ ( + #define ASMFMT_5(arg1, arg2, arg3, arg4, arg5) \ + , "a" (arg1), "c" (arg2), "d" (arg3), "S" (arg4), "D" (arg5) + #define ASMFMT_6(arg1, arg2, arg3, arg4, arg5, arg6) \ +- , "a" (arg1), "c" (arg2), "d" (arg3), "S" (arg4), "D" (arg5), "m" (arg6) ++ , "a" (arg1), "c" (arg2), "d" (arg3), "S" (arg4), "D" (arg5), "g" (arg6) + + #else /* !PIC */ + |