projects
/
reactos.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
dde1b98
)
[XDK/NTBASEDEF] Use __builtin_offsetof to define FIELD_OFFSET when compiling with...
author
Amine Khaldi
<amine.khaldi@reactos.org>
Tue, 31 Oct 2017 12:54:41 +0000
(13:54 +0100)
committer
Amine Khaldi
<amine.khaldi@reactos.org>
Tue, 31 Oct 2017 12:54:41 +0000
(13:54 +0100)
sdk/include/xdk/ntbasedef.h
patch
|
blob
|
history
diff --git
a/sdk/include/xdk/ntbasedef.h
b/sdk/include/xdk/ntbasedef.h
index
f41ea8f
..
a1270d2
100644
(file)
--- 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 */
-#if
ndef __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))