aboutsummaryrefslogtreecommitdiff
path: root/gdb/python/py-tui.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/python/py-tui.c')
-rw-r--r--gdb/python/py-tui.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/gdb/python/py-tui.c b/gdb/python/py-tui.c
index 4cb86ae..de7c396 100644
--- a/gdb/python/py-tui.c
+++ b/gdb/python/py-tui.c
@@ -21,10 +21,16 @@
#include "defs.h"
#include "arch-utils.h"
#include "python-internal.h"
-#include "gdb_curses.h"
#ifdef TUI
+/* Note that Python's public headers may define HAVE_NCURSES_H, so if
+ we unconditionally include this (outside the #ifdef above), then we
+ can get a compile error when ncurses is not in fact installed. See
+ PR tui/25597; or the upstream Python bug
+ https://bugs.python.org/issue20768. */
+#include "gdb_curses.h"
+
#include "tui/tui-data.h"
#include "tui/tui-io.h"
#include "tui/tui-layout.h"