From: "Michael S. Tsirkin" <mst@redhat.com>
To: David 'Digit' Turner <digit@google.com>
Cc: qemu-devel@nongnu.org
Subject: Re: [PATCH 1/3] Fix libvhost-user.c compilation.
Date: Fri, 7 Apr 2023 04:03:25 -0400 [thread overview]
Message-ID: <20230407035709-mutt-send-email-mst@kernel.org> (raw)
In-Reply-To: <20230405172109.3081788-2-digit@google.com>
If you are reposting, please version patchsets, E.g.
-v2 flag for git format-patch will enerate [PATCH v2] for you.
Repeating what I said on previous version:
On Wed, Apr 05, 2023 at 07:21:07PM +0200, David 'Digit' Turner wrote:
> The source file uses VIRTIO_F_VERSION_1 which is
> not defined by <linux/virtio_config.h> on Debian 10.
>
> The system-provided <linux/virtio_config.h> which
> does not include the macro definition is included
> through <linux/vhost.h>, so fix the issue by including
> the standard-headers version before that.
>
> Signed-off-by: David 'Digit' Turner <digit@google.com>
This happens to work usually but there's no guarantee
"standard-headers/linux/virtio_config.h"
and <linux/virtio_config.h> are interchangeable or
even do not conflict.
But where is <linux/vhost.h> using <linux/virtio_config.h>?
Everyone should be using "standard-headers/linux/virtio_config.h".
> ---
> subprojects/libvhost-user/libvhost-user.c | 6 ++++++
> 1 file changed, 6 insertions(+)
>
> diff --git a/subprojects/libvhost-user/libvhost-user.c b/subprojects/libvhost-user/libvhost-user.c
> index 0200b78e8e..0a5768cb55 100644
> --- a/subprojects/libvhost-user/libvhost-user.c
> +++ b/subprojects/libvhost-user/libvhost-user.c
> @@ -32,6 +32,12 @@
> #include <sys/mman.h>
> #include <endian.h>
>
> +/* Necessary to provide VIRTIO_F_VERSION_1 on system
> + * with older linux headers. Must appear before
> + * <linux/vhost.h> below.
> + */
> +#include "standard-headers/linux/virtio_config.h"
> +
> #if defined(__linux__)
> #include <sys/syscall.h>
> #include <fcntl.h>
> --
> 2.40.0.348.gf938b09366-goog
next prev parent reply other threads:[~2023-04-07 8:04 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-04-05 17:21 [PATCH v2] Fix QEMU compilation on Debian 10 David 'Digit' Turner
2023-04-05 17:21 ` [PATCH 1/3] Fix libvhost-user.c compilation David 'Digit' Turner
2023-04-07 8:03 ` Michael S. Tsirkin [this message]
2023-04-07 9:24 ` David Turner
2023-04-07 9:25 ` David Turner
2023-04-07 9:29 ` David Turner
2023-04-07 9:46 ` Michael S. Tsirkin
2023-04-07 9:49 ` David Turner
2023-04-07 9:47 ` David Turner
2023-04-07 10:01 ` Michael S. Tsirkin
2023-04-18 8:47 ` Daniel P. Berrangé
2023-04-18 11:04 ` David Turner
2023-04-18 11:47 ` Michael S. Tsirkin
2023-04-05 17:21 ` [PATCH 2/3] update-linux-headers.sh: Add missing kernel headers David 'Digit' Turner
2023-04-05 17:21 ` [PATCH 3/3] Update linux headers to v6.3rc5 David 'Digit' Turner
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=20230407035709-mutt-send-email-mst@kernel.org \
--to=mst@redhat.com \
--cc=digit@google.com \
--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).