From patchwork Wed Dec 4 15:10:15 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tom Tromey X-Patchwork-Id: 36510 Received: (qmail 65056 invoked by alias); 4 Dec 2019 15:10:20 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Delivered-To: mailing list gdb-patches@sourceware.org Received: (qmail 65043 invoked by uid 89); 4 Dec 2019 15:10:19 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-25.4 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_DNSWL_NONE, SPF_PASS autolearn=ham version=3.3.1 spammy=1911, erroneously, HContent-Transfer-Encoding:8bit X-HELO: rock.gnat.com Received: from rock.gnat.com (HELO rock.gnat.com) (205.232.38.15) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 04 Dec 2019 15:10:18 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by filtered-rock.gnat.com (Postfix) with ESMTP id 3B727116D25; Wed, 4 Dec 2019 10:10:17 -0500 (EST) Received: from rock.gnat.com ([127.0.0.1]) by localhost (rock.gnat.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id qGHoPba5WZX8; Wed, 4 Dec 2019 10:10:17 -0500 (EST) Received: from murgatroyd.Home (97-118-104-188.hlrn.qwest.net [97.118.104.188]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by rock.gnat.com (Postfix) with ESMTPSA id ED89F116BA4; Wed, 4 Dec 2019 10:10:16 -0500 (EST) From: Tom Tromey To: gdb-patches@sourceware.org Cc: Tom Tromey Subject: [FYI] Fix another build failure in tui-selftests.c Date: Wed, 4 Dec 2019 08:10:15 -0700 Message-Id: <20191204151015.25326-1-tromey@adacore.com> MIME-Version: 1.0 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 --- gdb/ChangeLog | 4 ++++ gdb/unittests/tui-selftests.c | 3 ++- 2 files changed, 6 insertions(+), 1 deletion(-) 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 {