Jacek Caban : include: Use __builtin_offsetof on Clang.

Alexandre Julliard julliard at winehq.org
Thu Oct 7 16:21:21 CDT 2021


Module: wine
Branch: master
Commit: de9982f069e576b6aaebd96383af263584eedb03
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=de9982f069e576b6aaebd96383af263584eedb03

Author: Jacek Caban <jacek at codeweavers.com>
Date:   Thu Oct  7 16:27:22 2021 +0200

include: Use __builtin_offsetof on Clang.

Fixes a number of warning on MSVC target.

Signed-off-by: Jacek Caban <jacek at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 include/msvcrt/stddef.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/msvcrt/stddef.h b/include/msvcrt/stddef.h
index 8d946e5aedf..b3fdaf0c052 100644
--- a/include/msvcrt/stddef.h
+++ b/include/msvcrt/stddef.h
@@ -20,7 +20,7 @@
 
 #include <corecrt.h>
 
-#ifdef __GNUC__
+#if defined(__GNUC__) || defined(__clang__)
 #define offsetof(s,m)       __builtin_offsetof(s,m)
 #elif defined(_WIN64)
 #define offsetof(s,m)       (size_t)((ptrdiff_t)&(((s*)NULL)->m))




More information about the wine-cvs mailing list