summaryrefslogtreecommitdiff
path: root/tools/virtio/linux/kernel.h
diff options
context:
space:
mode:
Diffstat (limited to 'tools/virtio/linux/kernel.h')
-rw-r--r--tools/virtio/linux/kernel.h5
1 files changed, 1 insertions, 4 deletions
diff --git a/tools/virtio/linux/kernel.h b/tools/virtio/linux/kernel.h
index 8b877167933d..6702008f7f5c 100644
--- a/tools/virtio/linux/kernel.h
+++ b/tools/virtio/linux/kernel.h
@@ -10,6 +10,7 @@
#include <stdarg.h>
#include <linux/compiler.h>
+#include "../../../include/linux/container_of.h"
#include <linux/log2.h>
#include <linux/types.h>
#include <linux/overflow.h>
@@ -107,10 +108,6 @@ static inline void free_page(unsigned long addr)
free((void *)addr);
}
-#define container_of(ptr, type, member) ({ \
- const typeof( ((type *)0)->member ) *__mptr = (ptr); \
- (type *)( (char *)__mptr - offsetof(type,member) );})
-
# ifndef likely
# define likely(x) (__builtin_expect(!!(x), 1))
# endif