[PATCH] nvram: Add argument types to dlsym'd librtasevent functions

1 view
Skip to first unread message

Tyrel Datwyler

<tyreld@linux.ibm.com>
unread,
Aug 15, 2025, 1:09:57 PMAug 15
to powerpc-utils-devel@googlegroups.com, J. Neuschäfer
From: J. Neuschäfer <j....@posteo.net>

With GCC 15 (which assumes C23 by default), an empty argument list is
interpreted as zero arguments rather than an arbitrary number of arguments.

Signatures are based on:

https://github.com/ibm-power-utilities/librtas/blob/v2.0.6/librtasevent_src/librtasevent.h

Signed-off-by: J. Neuschäfer <j....@posteo.net>
---
src/nvram.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/nvram.c b/src/nvram.c
index 1987c3d94b1f..57c9df692a74 100644
--- a/src/nvram.c
+++ b/src/nvram.c
@@ -903,9 +903,9 @@ dump_rtas_event_entry(char *data, int len)
{
void *rtas_event;
void *handle;
- void *(*parse_rtas_event)();
- void (*rtas_print_event)();
- void (*cleanup_rtas_event)();
+ struct rtas_event *(*parse_rtas_event)(char *, int);
+ void (*rtas_print_event)(FILE *, struct rtas_event *, int);
+ void (*cleanup_rtas_event)(struct rtas_event *);

handle = dlopen("/usr/lib/librtasevent.so", RTLD_LAZY);
if (handle == NULL)
--
2.50.1

Tyrel Datwyler

<tyreld@linux.ibm.com>
unread,
Aug 15, 2025, 1:16:42 PMAug 15
to powerpc-utils-devel@googlegroups.com, J. Neuschäfer
On 8/15/25 10:09 AM, Tyrel Datwyler wrote:
> From: J. Neuschäfer <j....@posteo.net>
>
> With GCC 15 (which assumes C23 by default), an empty argument list is
> interpreted as zero arguments rather than an arbitrary number of arguments.
>
> Signatures are based on:
>
> https://github.com/ibm-power-utilities/librtas/blob/v2.0.6/librtasevent_src/librtasevent.h
>
> Signed-off-by: J. Neuschäfer <j....@posteo.net>

This is one of 4 patches thus far that I've received for this build breakage.
None of which so far have addressed the issues I pointed out in the first
iteration I received via
https://github.com/ibm-power-utilities/powerpc-utils/pull/105.

As I type this it looks like Michal has fixed the issues in his version via
https://github.com/ibm-power-utilities/powerpc-utils/pull/114.

-Tyrel

J. Neuschäfer

<j.ne@posteo.net>
unread,
Aug 20, 2025, 5:21:40 AMAug 20
to Tyrel Datwyler, powerpc-utils-devel@googlegroups.com, J. Neuschäfer
On Fri, Aug 15, 2025 at 10:16:37AM -0700, Tyrel Datwyler wrote:
> On 8/15/25 10:09 AM, Tyrel Datwyler wrote:
> > From: J. Neuschäfer <j....@posteo.net>
> >
> > With GCC 15 (which assumes C23 by default), an empty argument list is
> > interpreted as zero arguments rather than an arbitrary number of arguments.
> >
> > Signatures are based on:
> >
> > https://github.com/ibm-power-utilities/librtas/blob/v2.0.6/librtasevent_src/librtasevent.h
> >
> > Signed-off-by: J. Neuschäfer <j....@posteo.net>
>
> This is one of 4 patches thus far that I've received for this build breakage.
> None of which so far have addressed the issues I pointed out in the first
> iteration I received via
> https://github.com/ibm-power-utilities/powerpc-utils/pull/105.
>
> As I type this it looks like Michal has fixed the issues in his version via
> https://github.com/ibm-power-utilities/powerpc-utils/pull/114.
>
> -Tyrel

Sorry for the noise and additional review load; I didn't notice #105.
For good measure, I've updated my patch in #113.

I'm happy if any of the patchsets gets merged, I don't have a particular
preference for my version.


Thanks,
J. Neuschäfer
Reply all
Reply to author
Forward
0 new messages