public inbox for elfutils@sourceware.org
 help / color / mirror / Atom feed
From: "Érico Nogueira" <ericonr@disroot.org>
To: elfutils-devel@sourceware.org
Cc: "Érico Nogueira" <erico.erc@gmail.com>
Subject: [PATCH] debuginfod: fix compilation on platforms without <error.h>
Date: Wed, 10 Nov 2021 22:30:48 -0300	[thread overview]
Message-ID: <20211111013048.23491-1-ericonr@disroot.org> (raw)

From: Érico Nogueira <erico.erc@gmail.com>

"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      | 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  <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__
-- 
2.33.1


             reply	other threads:[~2021-11-11  5:07 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-11  1:30 Érico Nogueira [this message]
  -- strict thread matches above, loose matches on Subject: below --
2021-11-11  0:17 Érico Nogueira
2021-11-11  8:20 ` Mark Wielaard

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20211111013048.23491-1-ericonr@disroot.org \
    --to=ericonr@disroot.org \
    --cc=elfutils-devel@sourceware.org \
    --cc=erico.erc@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).