From c5b14c2646f3f5cfa4e8ddf8ab8600287606dd8e 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 --- devicemodel/hw/platform/rtc.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/devicemodel/hw/platform/rtc.c b/devicemodel/hw/platform/rtc.c index a58839151..8a5ffad88 100644 --- a/devicemodel/hw/platform/rtc.c +++ b/devicemodel/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;