[XDK/NTBASEDEF] Use __builtin_offsetof to define FIELD_OFFSET when compiling with...
authorAmine Khaldi <amine.khaldi@reactos.org>
Tue, 31 Oct 2017 12:54:41 +0000 (13:54 +0100)
committerAmine Khaldi <amine.khaldi@reactos.org>
Tue, 31 Oct 2017 12:54:41 +0000 (13:54 +0100)
sdk/include/xdk/ntbasedef.h

index f41ea8f..a1270d2 100644 (file)
 #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))