mirror of
https://github.com/reactos/reactos.git
synced 2025-06-20 07:36:05 +00:00
[SDK][INCLUDE] Fix offsetof and CCSIZEOF_STRUCT for Clang-CL build (#3624)
Clang-CL was failing with "error: function declaration cannot have variably modified type". This PR will fix the Clang-CL build. CORE-17547
This commit is contained in:
parent
8bf471105e
commit
66f6abfc4a
2 changed files with 19 additions and 3 deletions
|
@ -147,7 +147,11 @@ extern "C" {
|
|||
#define NM_THEMECHANGED (NM_FIRST-22)
|
||||
|
||||
#ifndef CCSIZEOF_STRUCT
|
||||
#if defined(__clang__) /* Clang-CL fails without this workaround. See CORE-17547 */
|
||||
#define CCSIZEOF_STRUCT(structname,member) (__builtin_offsetof(structname,member) + sizeof(((structname*)0)->member))
|
||||
#else
|
||||
#define CCSIZEOF_STRUCT(structname,member) (((int)((LPBYTE)(&((structname*)0)->member) - ((LPBYTE)((structname*)0))))+sizeof(((structname*)0)->member))
|
||||
#endif
|
||||
#endif
|
||||
|
||||
typedef struct tagNMTOOLTIPSCREATED {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue