do not define __offsetof twice

This commit is contained in:
Alexander Medvednikov 2019-12-22 01:01:44 +03:00
parent 5cfbc7bab5
commit 749d3ec14d
2 changed files with 6 additions and 3 deletions

View file

@ -21,8 +21,10 @@ const (
#endif
// for __offset_of
#ifndef __offsetof
#define __offsetof(s,memb) \\
((size_t)((char *)&((s *)0)->memb - (char *)0))
#endif
#define OPTION_CAST(x) (x)
'