From dacc571fc3cda9c4299499c258dfcf8fb70b39d8 Mon Sep 17 00:00:00 2001 From: Liu Shuo Date: Tue, 10 Apr 2018 12:54:51 +0800 Subject: [PATCH] DM: use standard offsetof to avoid duplicate definition Signed-off-by: Liu Shuo Acked-by: Anthony Xu --- hw/platform/rtc.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/hw/platform/rtc.c b/hw/platform/rtc.c index a58839151..8a5ffad88 100644 --- a/hw/platform/rtc.c +++ b/hw/platform/rtc.c @@ -30,6 +30,7 @@ #include #include #include +#include #include #include #include @@ -49,8 +50,6 @@ # define RTC_DEBUG(format, ...) do { } while (0) #endif -#define offsetof(type, member) ((size_t)(&((type *)0)->member)) - /* Register layout of the RTC */ struct rtcdev { uint8_t sec;