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>
This commit is contained in:
Jacek Caban 2021-10-07 16:27:22 +02:00 committed by Alexandre Julliard
parent 622b0e29a6
commit de9982f069
1 changed files with 1 additions and 1 deletions

View File

@ -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))