mirror of
https://github.com/zeldaret/oot.git
synced 2025-07-03 22:44:30 +00:00
Use __builtin_offsetof
for non IDO builds (#1140)
* Add offsetof macro * Change old uses of OFFSETOF with offsetof
This commit is contained in:
parent
ed0daabf98
commit
2191c8b0a0
5 changed files with 18 additions and 11 deletions
|
@ -7,4 +7,10 @@ typedef unsigned long size_t;
|
|||
|
||||
typedef unsigned int uintptr_t;
|
||||
|
||||
#ifdef __GNUC__
|
||||
#define offsetof(structure, member) __builtin_offsetof (structure, member)
|
||||
#else
|
||||
#define offsetof(structure, member) ((size_t)&(((structure*)0)->member))
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue