Alexandre Julliard : include/msvcrt: Make offsetof constant for compatibility with Mingw.
Alexandre Julliard
julliard at winehq.org
Tue Apr 23 17:39:53 CDT 2019
Module: wine
Branch: master
Commit: e76912880aca42f21db6445bf48ed24c4221af41
URL: https://source.winehq.org/git/wine.git/?a=commit;h=e76912880aca42f21db6445bf48ed24c4221af41
Author: Alexandre Julliard <julliard at winehq.org>
Date: Mon Apr 22 13:13:36 2019 +0200
include/msvcrt: Make offsetof constant for compatibility with Mingw.
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
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 0ceb65d..cc38d56 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)
More information about the wine-cvs
mailing list