From: Robert Szalai Date: Sun, 27 Oct 2019 18:47:03 +0000 (+0100) Subject: 64-bit mingw port: Change return type of 'offsetof' to intptr_t. X-Git-Tag: cln_1-3-5~17 X-Git-Url: https://www.ginac.de/CLN/cln.git//cln.git?a=commitdiff_plain;h=3d0b49b4f48f7d2661a09db0ea5a1e1fb7236c1b;p=cln.git 64-bit mingw port: Change return type of 'offsetof' to intptr_t. --- 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