From 5b972d5b297203a7717a4d8f2058867dfac3ab9e Mon Sep 17 00:00:00 2001 From: Corinna Vinschen Date: Fri, 11 Mar 2016 22:50:24 +0100 Subject: [PATCH] gmon.h: Fix type of gmonparam state member gmonparam::state is used in calls to Win32 Interlocked functions. Having this defined as int breaks the build on i686. Redefine as LONG (same size and correct type on all platforms) to make gcc happy. Signed-off-by: Corinna Vinschen --- winsup/cygwin/gmon.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/winsup/cygwin/gmon.h b/winsup/cygwin/gmon.h index b0fb479e2..fa648a236 100644 --- a/winsup/cygwin/gmon.h +++ b/winsup/cygwin/gmon.h @@ -65,6 +65,9 @@ extern void mcount(void); #ifdef __MINGW32__ #include <_bsd_types.h> #endif /* __MINGW32__*/ +#ifdef __CYGWIN__ +#include +#endif /* * Structure prepended to gmon.out profiling data file. @@ -153,7 +156,7 @@ struct rawarc { * The profiling data structures are housed in this structure. */ struct gmonparam { - volatile int state; + volatile LONG state; u_short *kcount; size_t kcountsize; u_short *froms;