From: Tom Tromey Date: Wed, 4 Dec 2019 15:08:13 +0000 (-0700) Subject: Fix another build failure in tui-selftests.c X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=7a9e9f9f1e78a085fdf60faadd83990c3ca6d18c;p=binutils-gdb.git Fix another build failure in tui-selftests.c Christian had emailed me to say that the TUI unit test broke the mingw build, but I erroneously thought this was fixed by the earlier patch that made the test body conditional on the TUI being built. However, I was wrong about this -- tui-selftests.c unconditionally includes tui-winsource.h, which fails if curses is not available. This patch fixes the build problem by moving this include into the "#ifdef TUI" section. Tested by rebuilding a mingw-hosted gdb. gdb/ChangeLog 2019-12-04 Tom Tromey * unittests/tui-selftests.c: Conditionally include tui-winsource.h. Change-Id: If608649ef5cbef8ea92192e11c53379742967ee7 --- diff --git a/gdb/ChangeLog b/gdb/ChangeLog index f27043da0e4..8837a238881 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,7 @@ +2019-12-04 Tom Tromey + + * unittests/tui-selftests.c: Conditionally include tui-winsource.h. + 2019-12-04 Tom Tromey * dwarf2read.c (process_structure_scope): Initialize diff --git a/gdb/unittests/tui-selftests.c b/gdb/unittests/tui-selftests.c index 95c12e3f5d2..03969ea8ef6 100644 --- a/gdb/unittests/tui-selftests.c +++ b/gdb/unittests/tui-selftests.c @@ -19,10 +19,11 @@ #include "defs.h" #include "gdbsupport/selftest.h" -#include "tui/tui-winsource.h" #ifdef TUI +#include "tui/tui-winsource.h" + namespace selftests { namespace tui {