debuginfod: fix compilation on platforms without <error.h>
authorÉrico Nogueira <erico.erc@gmail.com>
Thu, 11 Nov 2021 00:17:48 +0000 (21:17 -0300)
committerMark Wielaard <mark@klomp.org>
Thu, 11 Nov 2021 08:15:40 +0000 (09:15 +0100)
"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>
debuginfod/ChangeLog
debuginfod/debuginfod.cxx

index f06d3ee..822bd63 100644 (file)
@@ -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
index 521cb52..764e7b9 100644 (file)
 
 extern "C" {
 #include "printversion.h"
+#include "system.h"
 }
 
 #include "debuginfod.h"
 #include <dwarf.h>
-#include <system.h>
 
 #include <argp.h>
 #ifdef __GNUC__