From: Etienne Dechamps Date: Sat, 12 Jul 2014 12:32:23 +0000 (+0100) Subject: Resolve KEY_EVENT conflict between Windows and ncurses. X-Git-Tag: release-1.1pre11~63^2 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=b2a6381ab28dbae4bf976627afccbf6c2fcb0625;p=oweals%2Ftinc.git Resolve KEY_EVENT conflict between Windows and ncurses. This fixes the following compiler warning when building for Windows: In file included from top.c:24:0: /usr/local/mingw/ncurses/include/curses.h:1478:0: error: "KEY_EVENT" redefined [-Werror] #define KEY_EVENT 0633 /* We were interrupted by an event */ ^ In file included from /usr/share/mingw-w64/include/windows.h:74:0, from /usr/share/mingw-w64/include/winsock2.h:23, from have.h:46, from system.h:26, from top.c:20: /usr/share/mingw-w64/include/wincon.h:101:0: note: this is the location of the previous definition #define KEY_EVENT 0x1 ^ --- diff --git a/src/top.c b/src/top.c index 2824261..40b8047 100644 --- a/src/top.c +++ b/src/top.c @@ -21,6 +21,7 @@ #ifdef HAVE_CURSES +#undef KEY_EVENT /* There are conflicting declarations for KEY_EVENT in Windows wincon.h and curses.h. */ #include #include "control_common.h"