From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from knopi.disroot.org (knopi.disroot.org [178.21.23.139]) by sourceware.org (Postfix) with ESMTPS id 98BAC3858400 for ; Thu, 11 Nov 2021 04:12:59 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 98BAC3858400 Received: from localhost (localhost [127.0.0.1]) by disroot.org (Postfix) with ESMTP id 44EC47333B; Thu, 11 Nov 2021 05:12:57 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at disroot.org Received: from knopi.disroot.org ([127.0.0.1]) by localhost (disroot.org [127.0.0.1]) (amavisd-new, port 10024) with UTF8SMTP id QWt7cA8TrcFp; Thu, 11 Nov 2021 05:12:56 +0100 (CET) From: =?UTF-8?q?=C3=89rico=20Nogueira?= To: elfutils-devel@sourceware.org Cc: =?UTF-8?q?=C3=89rico=20Nogueira?= Subject: [PATCH] debuginfod: fix compilation on platforms without Date: Wed, 10 Nov 2021 21:17:48 -0300 Message-Id: <20211111001748.4977-1-ericonr@disroot.org> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-12.2 required=5.0 tests=BAYES_00, DATE_IN_PAST_03_06, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_MSPIKE_H2, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: elfutils-devel@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Elfutils-devel mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 Nov 2021 04:13:04 -0000 From: Érico Nogueira "system.h" only declares the error() function, so it needs to be in an 'extern "C"' block, otherwise linking fails. Since we are here, use quotes for "system.h" header, since it's a local header, not a system one. Signed-off-by: Érico Nogueira --- debuginfod/ChangeLog | 4 ++++ debuginfod/debuginfod.cxx | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/debuginfod/ChangeLog b/debuginfod/ChangeLog index f06d3ee3..822bd637 100644 --- a/debuginfod/ChangeLog +++ b/debuginfod/ChangeLog @@ -1,3 +1,7 @@ +2021-11-10 Érico N. Rolim + + * debuginfod.cxx: include "system.h" under 'extern "C"' block. + 2021-11-05 Frank Ch. Eigler PR28430 diff --git a/debuginfod/debuginfod.cxx b/debuginfod/debuginfod.cxx index 521cb529..764e7b94 100644 --- a/debuginfod/debuginfod.cxx +++ b/debuginfod/debuginfod.cxx @@ -33,11 +33,11 @@ extern "C" { #include "printversion.h" +#include "system.h" } #include "debuginfod.h" #include -#include #include #ifdef __GNUC__ -- 2.33.1