mirror of
https://github.com/reactos/reactos.git
synced 2025-04-27 09:00:27 +00:00
[XDK/NTBASEDEF] Use __builtin_offsetof to define FIELD_OFFSET when compiling with clang-cl. CORE-11799 (#94)
This commit is contained in:
parent
dde1b98a78
commit
8ffffbb294
1 changed files with 1 additions and 1 deletions
|
@ -104,7 +104,7 @@
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Returns the byte offset of the specified structure's member */
|
/* Returns the byte offset of the specified structure's member */
|
||||||
#ifndef __GNUC__
|
#if !defined(__GNUC__) && !defined(__clang__)
|
||||||
#define FIELD_OFFSET(Type, Field) ((LONG)(LONG_PTR)&(((Type*) 0)->Field))
|
#define FIELD_OFFSET(Type, Field) ((LONG)(LONG_PTR)&(((Type*) 0)->Field))
|
||||||
#else
|
#else
|
||||||
#define FIELD_OFFSET(Type, Field) ((LONG)__builtin_offsetof(Type, Field))
|
#define FIELD_OFFSET(Type, Field) ((LONG)__builtin_offsetof(Type, Field))
|
||||||
|
|
Loading…
Reference in a new issue