aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/ui/console.h3
-rw-r--r--ui/curses.c1
2 files changed, 3 insertions, 1 deletions
diff --git a/include/ui/console.h b/include/ui/console.h
index ee8c407cac..b59e7b8c15 100644
--- a/include/ui/console.h
+++ b/include/ui/console.h
@@ -337,7 +337,10 @@ static inline pixman_format_code_t surface_format(DisplaySurface *s)
}
#ifdef CONFIG_CURSES
+/* KEY_EVENT is defined in wincon.h and in curses.h. Avoid redefinition. */
+#undef KEY_EVENT
#include <curses.h>
+#undef KEY_EVENT
typedef chtype console_ch_t;
extern chtype vga_to_curses[];
#else
diff --git a/ui/curses.c b/ui/curses.c
index 2e132a7bfa..03cefdf470 100644
--- a/ui/curses.c
+++ b/ui/curses.c
@@ -22,7 +22,6 @@
* THE SOFTWARE.
*/
#include "qemu/osdep.h"
-#include <curses.h>
#ifndef _WIN32
#include <sys/ioctl.h>