include/msvcrt: Make offsetof constant for compatibility with Mingw.

Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Alexandre Julliard 2019-04-22 13:13:36 +02:00
parent f402bcd0c3
commit e76912880a
1 changed files with 3 additions and 1 deletions

View File

@ -28,7 +28,9 @@
#endif
#endif
#ifdef _WIN64
#ifdef __GNUC__
#define offsetof(s,m) __builtin_offsetof(s,m)
#elif defined(_WIN64)
#define offsetof(s,m) (size_t)((ptrdiff_t)&(((s*)NULL)->m))
#else
#define offsetof(s,m) (size_t)&(((s*)NULL)->m)