summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlejandro Colomar <alx.manpages@gmail.com>2021-11-19 19:12:34 +0100
committerAlejandro Colomar <alx.manpages@gmail.com>2021-11-20 14:45:32 +0100
commitd5e54883d3747db8132880fef1d308aaf124e0e0 (patch)
treecbe9315b28dbe72c0da01bebcaff644578303492
parentab4f6b9fb71b7ff24a0299d6413578a34e1d129b (diff)
tools/virtio/: Don't redefine ARRAY_SIZE()
Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
-rw-r--r--tools/virtio/linux/kernel.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/tools/virtio/linux/kernel.h b/tools/virtio/linux/kernel.h
index 0b493542e61a..8ee01e6e5e3a 100644
--- a/tools/virtio/linux/kernel.h
+++ b/tools/virtio/linux/kernel.h
@@ -1,6 +1,8 @@
/* SPDX-License-Identifier: GPL-2.0 */
#ifndef KERNEL_H
#define KERNEL_H
+
+
#include <stdbool.h>
#include <stdlib.h>
#include <stddef.h>
@@ -9,6 +11,7 @@
#include <assert.h>
#include <stdarg.h>
+#include <linux/array_size.h>
#include <linux/compiler.h>
#include <linux/types.h>
#include <linux/overflow.h>
@@ -19,6 +22,7 @@
#include <unistd.h>
#include <asm/barrier.h>
+
#define CONFIG_SMP
#define PAGE_SIZE getpagesize()
@@ -49,8 +53,6 @@ struct page {
#define __printf(a,b) __attribute__((format(printf,a,b)))
-#define ARRAY_SIZE(x) (sizeof(x)/sizeof(x[0]))
-
extern void *__kmalloc_fake, *__kfree_ignore_start, *__kfree_ignore_end;
static inline void *kmalloc(size_t s, gfp_t gfp)
{