From: Ilya Leoshkevich <iii@linux.ibm.com>
To: Laurent Vivier <laurent@vivier.eu>,
Richard Henderson <richard.henderson@linaro.org>
Cc: qemu-devel@nongnu.org, Ilya Leoshkevich <iii@linux.ibm.com>
Subject: [PATCH 1/3] linux-user: Fix the build on systems without SOL_ALG
Date: Thu, 10 Aug 2023 23:51:31 +0200 [thread overview]
Message-ID: <20230810215706.1394220-2-iii@linux.ibm.com> (raw)
In-Reply-To: <20230810215706.1394220-1-iii@linux.ibm.com>
Building QEMU on CentOS 7 fails, because there SOL_ALG is not defined.
There already exists #if defined(SOL_ALG) in do_setsockopt(); add it to
target_to_host_cmsg() as well.
Fixes: 27404b6c15c1 ("linux-user: Implement SOL_ALG encryption support")
Signed-off-by: Ilya Leoshkevich <iii@linux.ibm.com>
---
linux-user/syscall.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/linux-user/syscall.c b/linux-user/syscall.c
index 18d3107194b..42f4aed8e84 100644
--- a/linux-user/syscall.c
+++ b/linux-user/syscall.c
@@ -1806,6 +1806,7 @@ static inline abi_long target_to_host_cmsg(struct msghdr *msgh,
__get_user(cred->pid, &target_cred->pid);
__get_user(cred->uid, &target_cred->uid);
__get_user(cred->gid, &target_cred->gid);
+#ifdef SOL_ALG
} else if (cmsg->cmsg_level == SOL_ALG) {
uint32_t *dst = (uint32_t *)data;
@@ -1814,6 +1815,7 @@ static inline abi_long target_to_host_cmsg(struct msghdr *msgh,
if (len >= sizeof(uint32_t)) {
*dst = tswap32(*dst);
}
+#endif
} else {
qemu_log_mask(LOG_UNIMP, "Unsupported ancillary data: %d/%d\n",
cmsg->cmsg_level, cmsg->cmsg_type);
--
2.41.0
next prev parent reply other threads:[~2023-08-10 22:26 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-10 21:51 [PATCH 0/3] Fix the build on CentOS 7 Ilya Leoshkevich
2023-08-10 21:51 ` Ilya Leoshkevich [this message]
2023-08-11 14:11 ` [PATCH 1/3] linux-user: Fix the build on systems without SOL_ALG Philippe Mathieu-Daudé
2023-08-10 21:51 ` [PATCH 2/3] linux-user: Fix the build on systems without MAP_SHARED_VALIDATE Ilya Leoshkevich
2023-08-10 22:03 ` Helge Deller
2023-08-10 22:13 ` Ilya Leoshkevich
2023-08-10 21:51 ` [PATCH 3/3] linux-user: Fix the build on systems without MADV_{KEEP, WIPE}ONFORK Ilya Leoshkevich
2023-08-17 11:03 ` [PATCH 0/3] Fix the build on CentOS 7 Daniel P. Berrangé
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=20230810215706.1394220-2-iii@linux.ibm.com \
--to=iii@linux.ibm.com \
--cc=laurent@vivier.eu \
--cc=qemu-devel@nongnu.org \
--cc=richard.henderson@linaro.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).