Module: wine Branch: oldstable Commit: d1d979bf914f9d9d348bf1f2da32471944729fe2 URL: https://source.winehq.org/git/wine.git/?a=commit;h=d1d979bf914f9d9d348bf1f2d...
Author: Jacek Caban jacek@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@codeweavers.com Signed-off-by: Alexandre Julliard julliard@winehq.org (cherry picked from commit de9982f069e576b6aaebd96383af263584eedb03) Signed-off-by: Michael Stefaniuc mstefani@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))