diff options
author | Michael S. Tsirkin <mst@redhat.com> | 2015-09-09 22:03:30 +0300 |
---|---|---|
committer | Michael S. Tsirkin <mst@redhat.com> | 2015-09-09 22:03:30 +0300 |
commit | ddab2c0eaf57b2de0b2516a477e3ce0f7554509b (patch) | |
tree | d1eb57b89a4da9bac367b58739805d3e239f51a7 /tools/virtio/linux | |
parent | 997e120843e82609c8d99a9d5714e6cf91e14cbe (diff) | |
download | op-kernel-dev-ddab2c0eaf57b2de0b2516a477e3ce0f7554509b.zip op-kernel-dev-ddab2c0eaf57b2de0b2516a477e3ce0f7554509b.tar.gz |
tools/virtio: fix build after 4.2 changes
more stubs, mostly
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'tools/virtio/linux')
-rw-r--r-- | tools/virtio/linux/export.h | 3 | ||||
-rw-r--r-- | tools/virtio/linux/kernel.h | 8 |
2 files changed, 11 insertions, 0 deletions
diff --git a/tools/virtio/linux/export.h b/tools/virtio/linux/export.h new file mode 100644 index 0000000..416875e --- /dev/null +++ b/tools/virtio/linux/export.h @@ -0,0 +1,3 @@ +#define EXPORT_SYMBOL_GPL(sym) extern typeof(sym) sym +#define EXPORT_SYMBOL(sym) extern typeof(sym) sym + diff --git a/tools/virtio/linux/kernel.h b/tools/virtio/linux/kernel.h index 1e8ce69..0a3da64 100644 --- a/tools/virtio/linux/kernel.h +++ b/tools/virtio/linux/kernel.h @@ -22,6 +22,7 @@ typedef unsigned long long dma_addr_t; typedef size_t __kernel_size_t; +typedef unsigned int __wsum; struct page { unsigned long long dummy; @@ -47,6 +48,13 @@ static inline void *kmalloc(size_t s, gfp_t gfp) return __kmalloc_fake; return malloc(s); } +static inline void *kzalloc(size_t s, gfp_t gfp) +{ + void *p = kmalloc(s, gfp); + + memset(p, 0, s); + return p; +} static inline void kfree(void *p) { |