mirror of
https://github.com/ApfelTeeSaft/reactos.git
synced 2026-09-02 19:26:32 +00:00
[XDK/NTBASEDEF] Use __builtin_offsetof to define FIELD_OFFSET when compiling with clang-cl. CORE-11799 (#94)
This commit is contained in:
@@ -104,7 +104,7 @@
|
||||
#endif
|
||||
|
||||
/* 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))
|
||||
#else
|
||||
#define FIELD_OFFSET(Type, Field) ((LONG)__builtin_offsetof(Type, Field))
|
||||
|
||||
Reference in New Issue
Block a user