summaryrefslogtreecommitdiff
path: root/tools/virtio
diff options
context:
space:
mode:
authorStefano Garzarella <sgarzare@redhat.com>2022-07-05 10:22:49 +0300
committerMichael S. Tsirkin <mst@redhat.com>2022-08-11 11:26:07 +0300
commitd650f830f38b19039958f3f4504ceeb2b5922da7 (patch)
tree801d5e5b539c97a486949b90c0ffebce3d5e9e9f /tools/virtio
parent994cea53183c211f218d5dbe14ab634f5762f068 (diff)
downloadlinux-d650f830f38b19039958f3f4504ceeb2b5922da7.tar.xz
tools/virtio: fix build
Fix the build caused by the following changes: - phys_addr_t is now defined in tools/include/linux/types.h - dev_warn_once() is used in drivers/virtio/virtio_ring.c - linux/uio.h included by vringh.h use INT_MAX defined in limits.h Signed-off-by: Stefano Garzarella <sgarzare@redhat.com> Message-Id: <20220705072249.7867-1-sgarzare@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Acked-by: Eugenio PĂ©rez <eperezma@redhat.com> Signed-off-by: Peng Fan <peng.fan@nxp.com> Acked-by: Jason Wang <jasowang@redhat.com>
Diffstat (limited to 'tools/virtio')
-rw-r--r--tools/virtio/linux/kernel.h2
-rw-r--r--tools/virtio/linux/vringh.h1
2 files changed, 2 insertions, 1 deletions
diff --git a/tools/virtio/linux/kernel.h b/tools/virtio/linux/kernel.h
index 0b493542e61a..21593bf97755 100644
--- a/tools/virtio/linux/kernel.h
+++ b/tools/virtio/linux/kernel.h
@@ -29,7 +29,6 @@
#define READ 0
#define WRITE 1
-typedef unsigned long long phys_addr_t;
typedef unsigned long long dma_addr_t;
typedef size_t __kernel_size_t;
typedef unsigned int __wsum;
@@ -136,6 +135,7 @@ static inline void *krealloc_array(void *p, size_t new_n, size_t new_size, gfp_t
#endif
#define dev_err(dev, format, ...) fprintf (stderr, format, ## __VA_ARGS__)
#define dev_warn(dev, format, ...) fprintf (stderr, format, ## __VA_ARGS__)
+#define dev_warn_once(dev, format, ...) fprintf (stderr, format, ## __VA_ARGS__)
#define min(x, y) ({ \
typeof(x) _min1 = (x); \
diff --git a/tools/virtio/linux/vringh.h b/tools/virtio/linux/vringh.h
index 9348957be56e..e11c6aece734 100644
--- a/tools/virtio/linux/vringh.h
+++ b/tools/virtio/linux/vringh.h
@@ -1 +1,2 @@
+#include <limits.h>
#include "../../../include/linux/vringh.h"