Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 1 | From 99617d7ab5b01c322b0f27d4aa0dd91c61793a5e Mon Sep 17 00:00:00 2001 |
| 2 | From: =?UTF-8?q?=C3=89rico=20Nogueira?= <erico.erc@gmail.com> |
| 3 | Date: Wed, 10 Nov 2021 21:17:48 -0300 |
| 4 | Subject: [PATCH] debuginfod: fix compilation on platforms without <error.h> |
| 5 | MIME-Version: 1.0 |
| 6 | Content-Type: text/plain; charset=UTF-8 |
| 7 | Content-Transfer-Encoding: 8bit |
| 8 | |
| 9 | "system.h" only declares the error() function, so it needs to be in an |
| 10 | 'extern "C"' block, otherwise linking fails. |
| 11 | |
| 12 | Since we are here, use quotes for "system.h" header, since it's a local |
| 13 | header, not a system one. |
| 14 | |
| 15 | Upstream-Status: Backport [https://sourceware.org/git/?p=elfutils.git;a=commit;h=90b9e91b961b794a4e58ab76d9191a5e7343584e] |
| 16 | Signed-off-by: Érico Nogueira <erico.erc@gmail.com> |
| 17 | Signed-off-by: Alexander Kanavin <alex@linutronix.de> |
| 18 | --- |
| 19 | debuginfod/ChangeLog | 4 ++++ |
| 20 | debuginfod/debuginfod.cxx | 2 +- |
| 21 | 2 files changed, 5 insertions(+), 1 deletion(-) |
| 22 | |
| 23 | diff --git a/debuginfod/ChangeLog b/debuginfod/ChangeLog |
| 24 | index f06d3ee..822bd63 100644 |
| 25 | --- a/debuginfod/ChangeLog |
| 26 | +++ b/debuginfod/ChangeLog |
| 27 | @@ -1,3 +1,7 @@ |
| 28 | +2021-11-10 Érico N. Rolim <erico.erc@gmail.com> |
| 29 | + |
| 30 | + * debuginfod.cxx: include "system.h" under 'extern "C"' block. |
| 31 | + |
| 32 | 2021-11-05 Frank Ch. Eigler <fche@redhat.com> |
| 33 | |
| 34 | PR28430 |
| 35 | diff --git a/debuginfod/debuginfod.cxx b/debuginfod/debuginfod.cxx |
| 36 | index 521cb52..764e7b9 100644 |
| 37 | --- a/debuginfod/debuginfod.cxx |
| 38 | +++ b/debuginfod/debuginfod.cxx |
| 39 | @@ -33,11 +33,11 @@ |
| 40 | |
| 41 | extern "C" { |
| 42 | #include "printversion.h" |
| 43 | +#include "system.h" |
| 44 | } |
| 45 | |
| 46 | #include "debuginfod.h" |
| 47 | #include <dwarf.h> |
| 48 | -#include <system.h> |
| 49 | |
| 50 | #include <argp.h> |
| 51 | #ifdef __GNUC__ |
| 52 | -- |
| 53 | 2.20.1 |
| 54 | |