From patchwork Thu Nov 17 09:06:01 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: ncurses 5.3 conflicts with latest qemu Date: Wed, 16 Nov 2011 23:06:01 -0000 From: Caraman Mihai Claudiu-B02008 X-Patchwork-Id: 126162 Message-Id: To: "qemu-devel@nongnu.org" Hi, A recent patch in qemu conflicts with old ncurses libraries (version 5.3). You will see this error cause by bool type redefinition in curses.h (with CONFIG_CURSES configured by default): console.c: In function 'text_console_init': console.c:1550:23: error: assignment from incompatible pointer type the qemu patch exposing this problem is: curses: fix garbling when chtype != long author Devin J. Pohly Wed, 7 Sep 2011 19:44:36 +0000 (15:44 -0400) committer Anthony Liguori Fri, 9 Sep 2011 17:58:16 +0000 (12:58 -0500) commit df00bed0fa30a6f5712456e7add783e470c534c9 The problem seems to be fixed in newer versions of ncurses (5.7 and above). I just looked over the sources, so better if someone can confirm this. Here is a qemu patch that solve the conflict with old ncurses: Signed-off-by: Mihai Caraman --- Fix compile errors with old ncurses libraries (version 5.3) caused by bool type redefinition. qemu-common.h | 3 +++ console.h | 1 - 2 files changed, 3 insertions(+), 1 deletions(-) diff --git a/qemu-common.h b/qemu-common.h index 5e87bdf..9ac15ba 100644 --- a/qemu-common.h +++ b/qemu-common.h @@ -23,6 +23,9 @@ typedef struct Monitor Monitor; #include #include #include +#ifdef CONFIG_CURSES +#include +#endif #include #include #include diff --git a/console.h b/console.h index 9c1487e..3327c43 100644 --- a/console.h +++ b/console.h @@ -329,7 +329,6 @@ static inline int ds_get_bytes_per_pixel(DisplayState *ds) } #ifdef CONFIG_CURSES -#include typedef chtype console_ch_t; #else typedef unsigned long console_ch_t; -- 1.7.4.1