1
0
Fork 0
mirror of https://github.com/zeldaret/oot.git synced 2024-11-29 12:04:29 +00:00
oot/include/libc/stddef.h
Anghelo Carvajal 2191c8b0a0
Use __builtin_offsetof for non IDO builds (#1140)
* Add offsetof macro

* Change old uses of OFFSETOF with offsetof
2022-02-13 00:05:11 -05:00

16 lines
309 B
C

#ifndef STDDEF_H
#define STDDEF_H
#define NULL ((void*)0)
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