From e76912880aca42f21db6445bf48ed24c4221af41 Mon Sep 17 00:00:00 2001 From: Alexandre Julliard Date: Mon, 22 Apr 2019 13:13:36 +0200 Subject: [PATCH] include/msvcrt: Make offsetof constant for compatibility with Mingw. Signed-off-by: Alexandre Julliard --- include/msvcrt/stddef.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/include/msvcrt/stddef.h b/include/msvcrt/stddef.h index 0ceb65d91cd..cc38d569177 100644 --- a/include/msvcrt/stddef.h +++ b/include/msvcrt/stddef.h @@ -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)