DM: use standard offsetof to avoid duplicate definition

Signed-off-by: Liu Shuo <shuo.a.liu@intel.com>
Acked-by: Anthony Xu <anthony.xu@intel.com>
This commit is contained in:
Liu Shuo 2018-04-10 12:54:51 +08:00 committed by lijinxia
parent ff33657234
commit dacc571fc3

View File

@ -30,6 +30,7 @@
#include <pthread.h>
#include <string.h>
#include <assert.h>
#include <stddef.h>
#include <stdbool.h>
#include <stdio.h>
#include <stdlib.h>
@ -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;