tools/virtio: more stubs to fix tools build
authorMichael S. Tsirkin <mst@redhat.com>
Thu, 25 Jan 2018 23:36:40 +0000 (01:36 +0200)
committerDavid S. Miller <davem@davemloft.net>
Mon, 29 Jan 2018 17:02:54 +0000 (12:02 -0500)
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
tools/virtio/linux/kernel.h
tools/virtio/linux/thread_info.h [new file with mode: 0644]

index 395521a..fca8381 100644 (file)
@@ -118,7 +118,7 @@ static inline void free_page(unsigned long addr)
 #define dev_err(dev, format, ...) fprintf (stderr, format, ## __VA_ARGS__)
 #define dev_warn(dev, format, ...) fprintf (stderr, format, ## __VA_ARGS__)
 
-#define WARN_ON_ONCE(cond) ((cond) && fprintf (stderr, "WARNING\n"))
+#define WARN_ON_ONCE(cond) ((cond) ? fprintf (stderr, "WARNING\n") : 0)
 
 #define min(x, y) ({                           \
        typeof(x) _min1 = (x);                  \
diff --git a/tools/virtio/linux/thread_info.h b/tools/virtio/linux/thread_info.h
new file mode 100644 (file)
index 0000000..e0f610d
--- /dev/null
@@ -0,0 +1 @@
+#define check_copy_size(A, B, C) (1)