From: Aleksandar Markovic <aleksandar.markovic@rt-rk.com>
To: qemu-devel@nongnu.org
Cc: laurent@vivier.eu, amarkovic@wavecomp.com
Subject: [Qemu-devel] [PATCH v12 5/5] linux-user: Fix flock structure for MIPS O64 ABI
Date: Wed, 19 Jun 2019 16:17:14 +0200 [thread overview]
Message-ID: <1560953834-29584-6-git-send-email-aleksandar.markovic@rt-rk.com> (raw)
In-Reply-To: <1560953834-29584-1-git-send-email-aleksandar.markovic@rt-rk.com>
From: Aleksandar Markovic <amarkovic@wavecomp.com>
Only MIPS O32 and N32 have special (different than other
architectures) definition of structure flock in kernel.
Bring flock definition for MIPS O64 ABI to the correct state.
Reported-by: Dragan Mladjenovic <dmladjenovic@wavecomp.com>
Signed-off-by: Aleksandar Markovic <amarkovic@wavecomp.com>
---
linux-user/generic/fcntl.h | 2 +-
linux-user/mips/target_fcntl.h | 4 ++++
2 files changed, 5 insertions(+), 1 deletion(-)
diff --git a/linux-user/generic/fcntl.h b/linux-user/generic/fcntl.h
index a775a49..1b48dde 100644
--- a/linux-user/generic/fcntl.h
+++ b/linux-user/generic/fcntl.h
@@ -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;
diff --git a/linux-user/mips/target_fcntl.h b/linux-user/mips/target_fcntl.h
index 000527c..795bba7 100644
--- a/linux-user/mips/target_fcntl.h
+++ b/linux-user/mips/target_fcntl.h
@@ -27,7 +27,11 @@
#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' */
--
2.7.4
next prev parent reply other threads:[~2019-06-19 14:23 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-06-19 14:17 [Qemu-devel] [PATCH v12 0/5] Aleksandar Markovic
2019-06-19 14:17 ` [Qemu-devel] [PATCH v12 1/5] linux-user: Add support for setsockopt() options IPV6_<ADD|DROP>_MEMBERSHIP Aleksandar Markovic
2019-06-19 16:08 ` Laurent Vivier
2019-06-24 21:04 ` Laurent Vivier
2019-06-19 14:17 ` [Qemu-devel] [PATCH v12 2/5] linux-user: Add support for setsockopt() option SOL_ALG Aleksandar Markovic
2019-06-24 21:01 ` Laurent Vivier
2019-06-19 14:17 ` [Qemu-devel] [PATCH v12 3/5] linux-user: Add support for translation of statx() syscall Aleksandar Markovic
2019-06-19 16:11 ` Laurent Vivier
2019-06-27 13:18 ` Aleksandar Markovic
2019-06-27 14:01 ` Laurent Vivier
2019-06-19 14:17 ` [Qemu-devel] [PATCH v12 4/5] linux-user: Add support for strace for " Aleksandar Markovic
2019-06-19 14:17 ` Aleksandar Markovic [this message]
2019-06-19 16:21 ` [Qemu-devel] [PATCH v12 5/5] linux-user: Fix flock structure for MIPS O64 ABI Laurent Vivier
2019-06-26 7:54 ` Aleksandar Markovic
2019-06-26 7:57 ` Laurent Vivier
2019-06-19 14:54 ` [Qemu-devel] [PATCH v12 0/5] no-reply
2019-06-19 15:34 ` no-reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1560953834-29584-6-git-send-email-aleksandar.markovic@rt-rk.com \
--to=aleksandar.markovic@rt-rk.com \
--cc=amarkovic@wavecomp.com \
--cc=laurent@vivier.eu \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).