From: Ilya Leoshkevich <iii@linux.ibm.com>
To: elfutils-devel@sourceware.org
Cc: Ilya Leoshkevich <iii@linux.ibm.com>
Subject: [PATCH RFC 01/11] libdwfl: Fix debuginfod_client redefinition
Date: Mon, 6 Feb 2023 23:25:03 +0100 [thread overview]
Message-ID: <20230206222513.1773039-2-iii@linux.ibm.com> (raw)
In-Reply-To: <20230206222513.1773039-1-iii@linux.ibm.com>
clang complains:
In file included from debuginfod-client.c:38:
./../debuginfod/debuginfod.h:47:34: error: redefinition of typedef 'debuginfod_client' is a C11 feature [-Werror,-Wtypedef-redefinition]
typedef struct debuginfod_client debuginfod_client;
^
./libdwfl.h:53:34: note: previous definition is here
typedef struct debuginfod_client debuginfod_client;
^
config/eu.am specifies -std=gnu99, and upgrading just for this is an
overkill. So is #including "debuginfod.h", since we don't know if users
even have it. So fix by using "struct debuginfod_client" instead. This
may break the clients that use dwfl_get_debuginfod_client() without
#including "debuginfod.h", but such cases should be rare.
Signed-off-by: Ilya Leoshkevich <iii@linux.ibm.com>
---
libdwfl/debuginfod-client.c | 2 +-
libdwfl/libdwfl.h | 5 +----
libdwfl/libdwflP.h | 4 ++--
3 files changed, 4 insertions(+), 7 deletions(-)
diff --git a/libdwfl/debuginfod-client.c b/libdwfl/debuginfod-client.c
index 882a5eff..c6f8e083 100644
--- a/libdwfl/debuginfod-client.c
+++ b/libdwfl/debuginfod-client.c
@@ -143,7 +143,7 @@ __libdwfl_debuginfod_init (void)
#else // ENABLE_LIBDEBUGINFOD
-debuginfod_client *
+struct debuginfod_client *
dwfl_get_debuginfod_client (Dwfl *dummy __attribute__ ((unused)))
{
return NULL;
diff --git a/libdwfl/libdwfl.h b/libdwfl/libdwfl.h
index 9114f7f0..ba2f081f 100644
--- a/libdwfl/libdwfl.h
+++ b/libdwfl/libdwfl.h
@@ -49,9 +49,6 @@ typedef struct Dwfl_Thread Dwfl_Thread;
PC location described by an FDE belonging to Dwfl_Thread. */
typedef struct Dwfl_Frame Dwfl_Frame;
-/* Handle for debuginfod-client connection. */
-typedef struct debuginfod_client debuginfod_client;
-
/* Callbacks. */
typedef struct
{
@@ -813,7 +810,7 @@ int dwfl_frame_reg (Dwfl_Frame *state, unsigned regno, Dwarf_Word *val)
first call to this function. If elfutils is compiled without support for debuginfod,
NULL will be returned.
*/
-extern debuginfod_client *dwfl_get_debuginfod_client (Dwfl *dwfl);
+extern struct debuginfod_client *dwfl_get_debuginfod_client (Dwfl *dwfl);
#ifdef __cplusplus
}
diff --git a/libdwfl/libdwflP.h b/libdwfl/libdwflP.h
index cdc528d0..fbd66f45 100644
--- a/libdwfl/libdwflP.h
+++ b/libdwfl/libdwflP.h
@@ -114,7 +114,7 @@ struct Dwfl
{
const Dwfl_Callbacks *callbacks;
#ifdef ENABLE_LIBDEBUGINFOD
- debuginfod_client *debuginfod;
+ struct debuginfod_client *debuginfod;
#endif
Dwfl_Module *modulelist; /* List in order used by full traversals. */
@@ -652,7 +652,7 @@ __libdwfl_debuginfod_find_debuginfo (Dwfl *dwfl,
const unsigned char *build_id_bits,
size_t build_id_len);
void
-__libdwfl_debuginfod_end (debuginfod_client *c);
+__libdwfl_debuginfod_end (struct debuginfod_client *c);
#endif
--
2.39.1
next prev parent reply other threads:[~2023-02-06 22:25 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-06 22:25 [PATCH RFC 00/11] Add Memory Sanitizer support Ilya Leoshkevich
2023-02-06 22:25 ` Ilya Leoshkevich [this message]
2023-02-07 19:22 ` [PATCH RFC 01/11] libdwfl: Fix debuginfod_client redefinition Mark Wielaard
2023-02-07 19:47 ` Ilya Leoshkevich
2023-02-06 22:25 ` [PATCH RFC 02/11] libasm: Fix xdefault_pattern initialization Ilya Leoshkevich
2023-02-07 19:41 ` Mark Wielaard
2023-02-07 19:49 ` Ilya Leoshkevich
2023-02-06 22:25 ` [PATCH RFC 03/11] printversion: Fix unused variable Ilya Leoshkevich
2023-02-07 20:44 ` Mark Wielaard
2023-02-08 12:22 ` Ilya Leoshkevich
2023-02-09 14:04 ` Mark Wielaard
2023-02-09 14:57 ` Ilya Leoshkevich
2023-02-06 22:25 ` [PATCH RFC 04/11] readelf: Fix set but not used parameter Ilya Leoshkevich
2023-02-08 16:52 ` Mark Wielaard
2023-02-06 22:25 ` [PATCH RFC 05/11] readelf: Fix set but not used variable Ilya Leoshkevich
2023-02-08 17:09 ` Mark Wielaard
2023-02-06 22:25 ` [PATCH RFC 06/11] Initialize reglocs for VMCOREINFO Ilya Leoshkevich
2023-02-08 17:27 ` Mark Wielaard
2023-02-06 22:25 ` [PATCH RFC 07/11] addr2line: Do not test demangling in run-addr2line-i-test.sh Ilya Leoshkevich
2023-02-08 18:15 ` Mark Wielaard
2023-02-06 22:25 ` [PATCH RFC 08/11] x86_64_return_value_location: Support lvalue and rvalue references Ilya Leoshkevich
2023-02-06 22:25 ` [PATCH RFC 09/11] configure: Use -fno-addrsig if possible Ilya Leoshkevich
2023-02-06 22:25 ` [PATCH RFC 10/11] configure: Add --disable-demangle Ilya Leoshkevich
2023-02-08 18:14 ` Mark Wielaard
2023-02-06 22:25 ` [PATCH RFC 11/11] configure: Add --enable-sanitize-memory Ilya Leoshkevich
2023-02-07 19:05 ` [PATCH RFC 00/11] Add Memory Sanitizer support Mark Wielaard
2023-02-07 19:46 ` Ilya Leoshkevich
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=20230206222513.1773039-2-iii@linux.ibm.com \
--to=iii@linux.ibm.com \
--cc=elfutils-devel@sourceware.org \
/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).