From 4085885616ac2613abac5c2316c488d5a12c3d0d Mon Sep 17 00:00:00 2001 From: Blue Swirl Date: Sat, 12 Sep 2009 09:58:46 +0000 Subject: Fix a Sparse warning about redefinition of offsetof() Signed-off-by: Blue Swirl --- osdep.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'osdep.h') diff --git a/osdep.h b/osdep.h index 32ee94b5ad..4b4aad4d49 100644 --- a/osdep.h +++ b/osdep.h @@ -2,6 +2,7 @@ #define QEMU_OSDEP_H #include +#include #ifdef __OpenBSD__ #include #include @@ -27,7 +28,7 @@ #define unlikely(x) __builtin_expect(!!(x), 0) #endif -#ifndef offsetof +#ifdef CONFIG_NEED_OFFSETOF #define offsetof(TYPE, MEMBER) ((size_t) &((TYPE *) 0)->MEMBER) #endif #ifndef container_of -- cgit v1.2.3