void-packages/srcpkgs/elfutils/patches/0001-debuginfod-fix-compilation-on-platforms-without-erro.patch
2021-11-12 23:16:26 -03:00

35 lines
902 B
Diff

From: =?UTF-8?q?=C3=89rico=20Nogueira?= <erico.erc@gmail.com>
Date: Wed, 10 Nov 2021 21:11:55 -0300
Subject: [PATCH] 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>
---
debuginfod/debuginfod.cxx | 2 +-
2 files changed, 5 insertions(+), 1 deletion(-)
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__
--
2.33.1