summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorÉrico Nogueira <erico.erc@gmail.com>2021-11-10 21:17:48 -0300
committerMark Wielaard <mark@klomp.org>2021-11-11 09:15:40 +0100
commit90b9e91b961b794a4e58ab76d9191a5e7343584e (patch)
tree4c64b4533a247b2e62a2b4d87a092bc4fc2ca0fc
parent983e86fd89e8bf02f2d27ba5dce5bf078af4ceda (diff)
downloadelfutils-90b9e91b961b794a4e58ab76d9191a5e7343584e.tar.gz
debuginfod: fix compilation on platforms without <error.h>
"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 <erico.erc@gmail.com>
-rw-r--r--debuginfod/ChangeLog4
-rw-r--r--debuginfod/debuginfod.cxx2
2 files changed, 5 insertions, 1 deletions
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 <erico.erc@gmail.com>
+
+ * debuginfod.cxx: include "system.h" under 'extern "C"' block.
+
2021-11-05 Frank Ch. Eigler <fche@redhat.com>
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 <dwarf.h>
-#include <system.h>
#include <argp.h>
#ifdef __GNUC__