diff options
author | Blue Swirl <blauwirbel@gmail.com> | 2009-09-12 09:58:46 +0000 |
---|---|---|
committer | Blue Swirl <blauwirbel@gmail.com> | 2009-09-12 09:58:46 +0000 |
commit | de5071c5515234cddbeaf1e6b794e1893f460b8a (patch) | |
tree | 473f3526679357d55f0034fa8ebe3f9dea1a534d /osdep.h | |
parent | 72cf2d4f0e181d0d3a3122e04129c58a95da713e (diff) | |
download | qemu-de5071c5515234cddbeaf1e6b794e1893f460b8a.tar.gz qemu-de5071c5515234cddbeaf1e6b794e1893f460b8a.tar.bz2 qemu-de5071c5515234cddbeaf1e6b794e1893f460b8a.zip |
Fix a Sparse warning about redefinition of offsetof()
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Diffstat (limited to 'osdep.h')
-rw-r--r-- | osdep.h | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -2,6 +2,7 @@ #define QEMU_OSDEP_H #include <stdarg.h> +#include <stddef.h> #ifdef __OpenBSD__ #include <sys/types.h> #include <sys/signal.h> @@ -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 |