diff mbox series

[v2,2/2] fcntl{34, 36}: Use arch dependent types for my_flock64

Message ID 20230427174309.1479093-3-edliaw@google.com
State Accepted
Headers show
Series fcntl{34,36}: Fixes for Android arm64 | expand

Commit Message

Edward Liaw April 27, 2023, 5:43 p.m. UTC
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(-)

Comments

Petr Vorel April 27, 2023, 6:36 p.m. UTC | #1
Hi Edward,

> 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.

Reviewed-by: Petr Vorel <pvorel@suse.cz>
Tested-by: Petr Vorel <pvorel@suse.cz>
(only on x86_64 libc)

Kind regards,
Petr
Petr Vorel April 28, 2023, 7:41 a.m. UTC | #2
Hi all,

thanks, patchset merged.

Kind regards,
Petr
diff mbox series

Patch

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
 };