]> git.ipfire.org Git - thirdparty/elfutils.git/commitdiff
debuginfod: Make sure there is only one typedef for debuginfod_client
authorMark Wielaard <mark@klomp.org>
Mon, 6 Feb 2023 09:21:58 +0000 (10:21 +0100)
committerMark Wielaard <mark@klomp.org>
Mon, 6 Feb 2023 09:21:58 +0000 (10:21 +0100)
Both debuginfod.h and libdwfl.h have a simple typedef for struct
debuginfod_client. Some compilers pedantically warn when including
both headers that such typedefs are only officially supported in
C11. So guard them with _ELFUTILS_DEBUGINFOD_CLIENT_TYPEDEF to
make them happy.

https://sourceware.org/bugzilla/show_bug.cgi?id=30077

Signed-off-by: Mark Wielaard <mark@klomp.org>
debuginfod/ChangeLog
debuginfod/debuginfod.h.in
libdwfl/ChangeLog
libdwfl/libdwfl.h

index fc44e03964e55a0e38e9d75512ae38cf7818b667..fe368c486a3485d5d32d098b1d593a8e74f97e46 100644 (file)
@@ -1,3 +1,8 @@
+2023-02-06  Mark Wielaard  <mark@klomp.org>
+
+       * debuginfod.h.in: Guard debuginfod_client typedef with
+       _ELFUTILS_DEBUGINFOD_CLIENT_TYPEDEF.
+
 2023-01-10  Mark Wielaard  <mark@klomp.org>
 
        * debuginfod-client.c (debuginfod_query_server): Use
index 69c9efd2cf99dff1686b352192e34d690a6e6511..4a256ba9af1f89d3b3205b0fcf5e51166166bffc 100644 (file)
 #define DEBUGINFOD_SONAME "@LIBDEBUGINFOD_SONAME@"
 
 /* Handle for debuginfod-client connection.  */
+#ifndef _ELFUTILS_DEBUGINFOD_CLIENT_TYPEDEF
 typedef struct debuginfod_client debuginfod_client;
+#define _ELFUTILS_DEBUGINFOD_CLIENT_TYPEDEF 1
+#endif
 
 #ifdef __cplusplus
 extern "C" {
index 9cd2f03cabdc6e0c17ef53d3e9e463886b0c2911..daef28285946e32be0ec839529737d08a710ced9 100644 (file)
@@ -1,3 +1,8 @@
+2023-02-06  Mark Wielaard  <mark@klomp.org>
+
+       * libdwfl.h: Guard debuginfod_client typedef with
+       _ELFUTILS_DEBUGINFOD_CLIENT_TYPEDEF.
+
 2022-12-21  Mark Wielaard  <mark@klomp.org>
 
        * core-file.c: Don't undef _.
index 9114f7f05d81ad7b3d8288c00d296ca0b620f6e9..49ad6664899ea884348213520d40217159c867a5 100644 (file)
@@ -50,7 +50,10 @@ typedef struct Dwfl_Thread Dwfl_Thread;
 typedef struct Dwfl_Frame Dwfl_Frame;
 
 /* Handle for debuginfod-client connection.  */
+#ifndef _ELFUTILS_DEBUGINFOD_CLIENT_TYPEDEF
 typedef struct debuginfod_client debuginfod_client;
+#define _ELFUTILS_DEBUGINFOD_CLIENT_TYPEDEF 1
+#endif
 
 /* Callbacks.  */
 typedef struct