https://git.reactos.org/?p=reactos.git;a=commitdiff;h=8ffffbb294027faf634d6…
commit 8ffffbb294027faf634d613b19501c7992808922
Author: Amine Khaldi <amine.khaldi(a)reactos.org>
AuthorDate: Tue Oct 31 13:54:41 2017 +0100
[XDK/NTBASEDEF] Use __builtin_offsetof to define FIELD_OFFSET when compiling with
clang-cl. CORE-11799 (#94)
---
sdk/include/xdk/ntbasedef.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sdk/include/xdk/ntbasedef.h b/sdk/include/xdk/ntbasedef.h
index f41ea8f324..a1270d2428 100644
--- a/sdk/include/xdk/ntbasedef.h
+++ b/sdk/include/xdk/ntbasedef.h
@@ -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))