From: Helge Deller <deller@kernel.org>
To: qemu-devel@nongnu.org, Stefan Hajnoczi <stefanha@gmail.com>
Cc: "Yoshinori Sato" <yoshinori.sato@nifty.com>,
"Cédric Le Goater" <clg@redhat.com>,
"Helge Deller" <deller@gmx.de>,
"Laurent Vivier" <laurent@vivier.eu>,
"Matt Turner" <mattst88@gmail.com>,
"Pierrick Bouvier" <pierrick.bouvier@oss.qualcomm.com>,
"Philippe Mathieu-Daudé" <philmd@oss.qualcomm.com>
Subject: [PULL 1/3] linux-user: Guard local FUTEX_CMD_MASK definition
Date: Tue, 28 Jul 2026 11:16:31 +0200 [thread overview]
Message-ID: <20260728091633.29765-2-deller@kernel.org> (raw)
In-Reply-To: <20260728091633.29765-1-deller@kernel.org>
From: Cédric Le Goater <clg@redhat.com>
Building linux-user on a host with Linux 7.2 kernel headers fails with
a macro redefinition error for FUTEX_CMD_MASK. The kernel commit
3ca9595d9fb6 ("futex: Add support for unlocking robust futexes")
expanded the mask to include the new FUTEX_ROBUST_UNLOCK and
FUTEX_ROBUST_LIST32 flags, which conflicts with QEMU's local
definition.
Add a #ifndef guard so the host definition takes precedence when
available. The local fallback is kept for older kernel headers
(pre-2.6.29) that lack FUTEX_CMD_MASK or define a mask without
FUTEX_CLOCK_REALTIME.
Signed-off-by: Cédric Le Goater <clg@redhat.com>
Reviewed-by: Pierrick Bouvier <pierrick.bouvier@oss.qualcomm.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@oss.qualcomm.com>
Signed-off-by: Helge Deller <deller@gmx.de>
---
linux-user/syscall_defs.h | 2 ++
1 file changed, 2 insertions(+)
diff --git a/linux-user/syscall_defs.h b/linux-user/syscall_defs.h
index 5799769f83..e033c7db34 100644
--- a/linux-user/syscall_defs.h
+++ b/linux-user/syscall_defs.h
@@ -2593,7 +2593,9 @@ struct target_drm_i915_getparam {
#define FUTEX_PRIVATE_FLAG 128
#define FUTEX_CLOCK_REALTIME 256
+#ifndef FUTEX_CMD_MASK
#define FUTEX_CMD_MASK ~(FUTEX_PRIVATE_FLAG | FUTEX_CLOCK_REALTIME)
+#endif
#if defined(TARGET_X86_64)
#define TARGET_EPOLL_PACKED QEMU_PACKED
--
2.54.0
next prev parent reply other threads:[~2026-07-28 9:17 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-28 9:16 [PULL 0/3] Linux user patches Helge Deller
2026-07-28 9:16 ` Helge Deller [this message]
2026-07-28 9:16 ` [PULL 2/3] linux-user: fix guards for the fsmount(2) syscall series Helge Deller
2026-07-28 9:16 ` [PULL 3/3] linux-user/sh4: allow full 32-bit address space Helge Deller
2026-07-28 15:31 ` [PULL 0/3] Linux user patches Stefan Hajnoczi
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=20260728091633.29765-2-deller@kernel.org \
--to=deller@kernel.org \
--cc=clg@redhat.com \
--cc=deller@gmx.de \
--cc=laurent@vivier.eu \
--cc=mattst88@gmail.com \
--cc=philmd@oss.qualcomm.com \
--cc=pierrick.bouvier@oss.qualcomm.com \
--cc=qemu-devel@nongnu.org \
--cc=stefanha@gmail.com \
--cc=yoshinori.sato@nifty.com \
/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