From patchwork Thu Feb 11 22:56:07 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Marcin_Ko=C5=9Bcielnicki?= X-Patchwork-Id: 10834 Received: (qmail 116274 invoked by alias); 11 Feb 2016 22:56:13 -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 116263 invoked by uid 89); 11 Feb 2016 22:56:12 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.6 required=5.0 tests=AWL, BAYES_00, RP_MATCHES_RCVD, SPF_PASS autolearn=ham version=3.3.2 spammy=sk:18d3cec, *tdesc, expanded_text, *tdesc_str X-HELO: xyzzy.0x04.net Received: from xyzzy.0x04.net (HELO xyzzy.0x04.net) (109.74.193.254) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 11 Feb 2016 22:56:11 +0000 Received: from hogfather.0x04.net (89-65-66-135.dynamic.chello.pl [89.65.66.135]) by xyzzy.0x04.net (Postfix) with ESMTPS id 8A5773FEC0; Thu, 11 Feb 2016 23:56:58 +0100 (CET) Received: by hogfather.0x04.net (Postfix, from userid 1000) id 3B067580089; Thu, 11 Feb 2016 23:56:08 +0100 (CET) From: =?UTF-8?q?Marcin=20Ko=C5=9Bcielnicki?= To: simon.marchi@ericsson.com Cc: gdb-patches@sourceware.org, palves@redhat.com, sergiodj@redhat.com, =?UTF-8?q?Marcin=20Ko=C5=9Bcielnicki?= Subject: [PATCH] gdb: Fix build failure in xml-tdesc.c without expat. Date: Thu, 11 Feb 2016 23:56:07 +0100 Message-Id: <1455231367-29672-1-git-send-email-koriakin@0x04.net> In-Reply-To: <56BCDABE.7080008@ericsson.com> References: <56BCDABE.7080008@ericsson.com> MIME-Version: 1.0 X-IsSubscribed: yes Introduced by 18d3cec54e1b4fce278dba436484846f8048d7d6. gdb/ChangeLog: * xml-tdesc.c (target_fetch_description_xml): Return NULL when built without expat. --- OK to push? Or should we emit a warning in this case? gdb/ChangeLog | 5 +++++ gdb/xml-tdesc.c | 4 ++++ 2 files changed, 9 insertions(+) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 5edafdf..4856db5 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +2016-02-11 Marcin Kościelnicki + + * xml-tdesc.c (target_fetch_description_xml): Return NULL when + built without expat. + 2016-02-11 Pedro Alves * Makefile.in (check-parallel): New rule. diff --git a/gdb/xml-tdesc.c b/gdb/xml-tdesc.c index 4625b60..22cf26b 100644 --- a/gdb/xml-tdesc.c +++ b/gdb/xml-tdesc.c @@ -638,6 +638,9 @@ target_read_description_xml (struct target_ops *ops) char * target_fetch_description_xml (struct target_ops *ops) { +#if !defined(HAVE_LIBEXPAT) + return NULL; +#else struct target_desc *tdesc; char *tdesc_str; char *expanded_text; @@ -659,4 +662,5 @@ target_fetch_description_xml (struct target_ops *ops) } return expanded_text; +#endif }