[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 1/2] Fix libvhost-user.c compilation.
From: |
David 'Digit' Turner |
Subject: |
[PATCH 1/2] Fix libvhost-user.c compilation. |
Date: |
Wed, 5 Apr 2023 14:59:19 +0200 |
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>
---
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
Re: [PATCH 0/2] Fix QEMU compilation on Debian 10, Paolo Bonzini, 2023/04/26