From 23f4a318f3df9823aa2076616a7a06b3972e8d6b Mon Sep 17 00:00:00 2001 From: Yaakov Selkowitz Date: Wed, 18 Dec 2013 18:07:47 +0000 Subject: Use wrapped windows header to fix compilation for Cygwin xload uses a windows-specific interface to obtain the load average, as getloadavg() is not implemented for Cygwin. Including some versions of windows.h after including X11 headers can lead to compilation errors as 'Status' is used as a type name in Xlib.h, but a parameter or memeber name in Windows headers. Include X11/Xwindows.h rather than windows.h directly, which wraps it in a such way to avoid any conflict with X11 headers. In file included from /usr/include/w32api/minwindef.h:146:0, from /usr/include/w32api/windef.h:8, from /usr/include/w32api/windows.h:69, from /jhbuild/checkout/xorg/app/xload/get_load.c:53: /usr/include/w32api/winnt.h:4951:15: error: two or more data types in declaration specifiers DWORD64 Status; ^ In file included from /usr/include/w32api/minwindef.h:146:0, from /usr/include/w32api/windef.h:8, from /usr/include/w32api/windows.h:69, from /jhbuild/checkout/xorg/app/xload/get_load.c:53: /usr/include/w32api/winnt.h:5090:13: error: two or more data types in declaration specifiers DWORD Status; ^ Signed-off-by: Yaakov Selkowitz Reviewed-by: Jon TURNEY --- get_load.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'get_load.c') diff --git a/get_load.c b/get_load.c index 0c67bbd..0f5d878 100644 --- a/get_load.c +++ b/get_load.c @@ -50,7 +50,7 @@ from the X Consortium. #if defined(__CYGWIN__) # define WIN32_LEAN_AND_MEAN -# include +# include typedef struct { DWORD stat; union { -- cgit v1.2.3