]> git.ipfire.org Git - thirdparty/qemu.git/commitdiff
linux-user: Fix target_flock structure for MIPS O64 ABI
authorAleksandar Markovic <amarkovic@wavecomp.com>
Fri, 28 Jun 2019 10:43:36 +0000 (12:43 +0200)
committerLaurent Vivier <laurent@vivier.eu>
Tue, 2 Jul 2019 14:56:46 +0000 (16:56 +0200)
Among MIPS ABIs, only MIPS O32 and N32 have special (different
than other architectures) definition of structure flock in kernel.

Bring target_flock definition in QEMU for MIPS O64 ABI to the
correct state, which is currently different than the most common
definition, and it should actually be the same.

Reported-by: Dragan Mladjenovic <dmladjenovic@wavecomp.com>
Signed-off-by: Aleksandar Markovic <amarkovic@wavecomp.com>
Reviewed-by: Laurent Vivier <laurent@vivier.eu>
Message-Id: <1561718618-20218-4-git-send-email-aleksandar.markovic@rt-rk.com>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
linux-user/generic/fcntl.h
linux-user/mips/target_fcntl.h

index a775a491e9e097000d5316d2fbe90b86695b2e7d..1b48ddeb99fe5805176e2c87c33b3a1fd7baf8c6 100644 (file)
@@ -129,7 +129,7 @@ struct target_flock {
     short l_whence;
     abi_long l_start;
     abi_long l_len;
-#if defined(TARGET_MIPS)
+#if defined(TARGET_MIPS) && (TARGET_ABI_BITS == 32)
     abi_long l_sysid;
 #endif
     int l_pid;
index 000527cc955ed41005f650cd2027cc479dbc8754..795bba754b5a338c4ffa4e72758f36d6ac8c3a9b 100644 (file)
 #define TARGET_F_SETOWN        24       /*  for sockets. */
 #define TARGET_F_GETOWN        23       /*  for sockets. */
 
+#if (TARGET_ABI_BITS == 32)
 #define TARGET_ARCH_FLOCK_PAD abi_long pad[4];
+#else
+#define TARGET_ARCH_FLOCK_PAD
+#endif
 #define TARGET_ARCH_FLOCK64_PAD
 
 #define TARGET_F_GETLK64       33      /*  using 'struct flock64' */