From 3d0b49b4f48f7d2661a09db0ea5a1e1fb7236c1b Mon Sep 17 00:00:00 2001 From: Robert Szalai Date: Sun, 27 Oct 2019 19:47:03 +0100 Subject: [PATCH] 64-bit mingw port: Change return type of 'offsetof' to intptr_t. --- src/base/cl_offsetof.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/base/cl_offsetof.h b/src/base/cl_offsetof.h index 89ddaf2..8a70c47 100644 --- a/src/base/cl_offsetof.h +++ b/src/base/cl_offsetof.h @@ -7,9 +7,9 @@ #undef offsetof #if defined(__GNUG__) - #define offsetof(type,ident) ((long)&(((type*)1)->ident)-1) + #define offsetof(type,ident) ((intptr_t)&(((type*)1)->ident)-1) #else - #define offsetof(type,ident) ((long)&(((type*)0)->ident)) + #define offsetof(type,ident) ((intptr_t)&(((type*)0)->ident)) #endif #ifndef _CL_OFFSETOF_H -- 2.49.0