diff options
author | Yaakov Selkowitz <yselkowitz@users.sourceforge.net> | 2013-12-18 18:07:47 +0000 |
---|---|---|
committer | Jon TURNEY <jon.turney@dronecode.org.uk> | 2014-05-02 17:11:33 +0100 |
commit | 23f4a318f3df9823aa2076616a7a06b3972e8d6b (patch) | |
tree | cbaf9e372ca2d3b2aa0daf1c344e233a531deeba | |
parent | 0705cf954e2d92b379493accd1f0f984d87ec575 (diff) |
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 <yselkowitz@users.sourceforge.net>
Reviewed-by: Jon TURNEY <jon.turney@dronecode.org.uk>
-rw-r--r-- | get_load.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -50,7 +50,7 @@ from the X Consortium. #if defined(__CYGWIN__) # define WIN32_LEAN_AND_MEAN -# include <windows.h> +# include <X11/Xwindows.h> typedef struct { DWORD stat; union { |