Skip to content

Commit c5b14c2

Browse files
Liu Shuojren1
authored andcommitted
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>
1 parent d9545ab commit c5b14c2

File tree

1 file changed

+1
-2
lines changed
  • devicemodel/hw/platform

1 file changed

+1
-2
lines changed

devicemodel/hw/platform/rtc.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
#include <pthread.h>
3131
#include <string.h>
3232
#include <assert.h>
33+
#include <stddef.h>
3334
#include <stdbool.h>
3435
#include <stdio.h>
3536
#include <stdlib.h>
@@ -49,8 +50,6 @@
4950
# define RTC_DEBUG(format, ...) do { } while (0)
5051
#endif
5152

52-
#define offsetof(type, member) ((size_t)(&((type *)0)->member))
53-
5453
/* Register layout of the RTC */
5554
struct rtcdev {
5655
uint8_t sec;

0 commit comments

Comments
 (0)