[LTP] [PATCH v2 2/2] fcntl{34, 36}: Use arch dependent types for my_flock64
Edward Liaw
edliaw@google.com
Thu Apr 27 19:43:09 CEST 2023
On Android arm64, fcntl is not accepting the my_flock64 struct being
passed (fails with EINVAL). This modifies the struct type to match the
flock64 definition in the kernel.
Signed-off-by: Edward Liaw <edliaw@google.com>
---
testcases/kernel/syscalls/fcntl/fcntl_common.h | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/testcases/kernel/syscalls/fcntl/fcntl_common.h b/testcases/kernel/syscalls/fcntl/fcntl_common.h
index 56e871167..86f2726af 100644
--- a/testcases/kernel/syscalls/fcntl/fcntl_common.h
+++ b/testcases/kernel/syscalls/fcntl/fcntl_common.h
@@ -16,13 +16,13 @@
#else
struct my_flock64 {
- int16_t l_type;
- int16_t l_whence;
- int64_t l_start;
- int64_t l_len;
- int32_t l_pid;
+ short l_type;
+ short l_whence;
+ off64_t l_start;
+ off64_t l_len;
+ pid_t l_pid;
#if defined(__sparc__)
- int16_t padding;
+ short padding;
#endif
};
--
2.40.1.495.gc816e09b53d-goog
More information about the ltp
mailing list