blob: bdd787afd56e70f917b6243ea7b6867443505c4a [file] [log] [blame]
Brad Bishopd7bf8c12018-02-25 22:55:05 -05001From 5f7333e4f7b7485598bd71aa80967e1a16a7f901 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Thu, 14 Sep 2017 22:57:52 -0700
4Subject: [PATCH] lss: Match syscalls to match musl
5
6Signed-off-by: Khem Raj <raj.khem@gmail.com>
7---
8 linux_syscall_support.h | 3 +++
9 1 file changed, 3 insertions(+)
10
Brad Bishope42b3e32020-01-15 22:08:42 -050011--- a/linux_syscall_support.h
12+++ b/linux_syscall_support.h
13@@ -816,6 +816,9 @@ struct kernel_statfs {
Brad Bishopd7bf8c12018-02-25 22:55:05 -050014 #define FUTEX_TRYLOCK_PI_PRIVATE (FUTEX_TRYLOCK_PI | FUTEX_PRIVATE_FLAG)
15 #endif
16
17+#ifndef __NR_fstatat
18+#define __NR_fstatat __NR_fstatat64
19+#endif
20
21 #if defined(__x86_64__)
22 #ifndef ARCH_SET_GS
Brad Bishope42b3e32020-01-15 22:08:42 -050023@@ -947,6 +950,7 @@ struct kernel_statfs {
Brad Bishopd7bf8c12018-02-25 22:55:05 -050024 #ifndef __NR_fallocate
25 #define __NR_fallocate 324
26 #endif
27+
28 /* End of i386 definitions */
29 #elif defined(__ARM_ARCH_3__) || defined(__ARM_EABI__)
30 #ifndef __NR_setresuid
Brad Bishope42b3e32020-01-15 22:08:42 -050031@@ -1239,6 +1243,12 @@ struct kernel_statfs {
Brad Bishopd7bf8c12018-02-25 22:55:05 -050032 #ifndef __NR_fallocate
33 #define __NR_fallocate 285
34 #endif
35+#ifndef __NR_pread
36+#define __NR_pread __NR_pread64
37+#endif
38+#ifndef __NR_pwrite
39+#define __NR_pwrite __NR_pwrite64
40+#endif
41 /* End of x86-64 definitions */
42 #elif defined(__mips__)
43 #if _MIPS_SIM == _MIPS_SIM_ABI32
Brad Bishope42b3e32020-01-15 22:08:42 -050044@@ -1418,6 +1428,12 @@ struct kernel_statfs {
45 #ifndef __NR_ioprio_get
46 #define __NR_ioprio_get (__NR_Linux + 274)
47 #endif
48+
49+#undef __NR_pread
50+#define __NR_pread __NR_pread64
51+#undef __NR_pwrite
52+#define __NR_pwrite __NR_pwrite64
53+
54 /* End of MIPS (64bit API) definitions */
55 #else
56 #ifndef __NR_setresuid