mirror of
https://github.com/yuzu-emu/unicorn.git
synced 2025-07-07 14:20:37 +00:00
compiler: Add missing container_of macro for MSVC
This commit is contained in:
parent
65e5d72a94
commit
4aaa75d05b
|
@ -77,6 +77,8 @@
|
||||||
#define tostring(s) #s
|
#define tostring(s) #s
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#define container_of(ptr, type, member) ((type *)((char *)(ptr) -offsetof(type,member)))
|
||||||
|
|
||||||
#define sizeof_field(type, field) sizeof(((type *)0)->field)
|
#define sizeof_field(type, field) sizeof(((type *)0)->field)
|
||||||
|
|
||||||
static double rint( double x )
|
static double rint( double x )
|
||||||
|
|
Loading…
Reference in a new issue