From a2f774427e078f3da2c06bdea25f77a61979a695 Mon Sep 17 00:00:00 2001 From: Sam James Date: Sat, 16 Nov 2024 05:13:48 +0000 Subject: gprofng: fix -std=gnu23 compatibility wrt unprototyped functions C23 removes support for unprototyped functions. Fix function pointer types accordingly. This does not fix all instances, there's a few left as I commented on in PR32374 (e.g. setitimer which I have a local workaround for but it involves a glibc implementation detail; the Linaro precommit CI tester pointed that out too, so dropped that). ChangeLog: PR gprofng/32374 * libcollector/collector.c (collector_sample): Fix prototype. * libcollector/envmgmt.c (putenv): Ditto. (_putenv): Ditto. (__collector_putenv): Ditto. (setenv): Ditto. (_setenv): Ditto. (__collector_setenv): Ditto. (unsetenv): Ditto. (_unsetenv): Ditto. (__collector_unsetenv): Ditto. * libcollector/jprofile.c (open_experiment): Ditto. (__collector_jprofile_enable_synctrace): Ditto. (jprof_find_asyncgetcalltrace): Ditto. * libcollector/libcol_util.c (__collector_util_init): Ditto. (ARCH): Ditto. * libcollector/mmaptrace.c (collector_func_load): Ditto. (collector_func_unload): Ditto. * libcollector/unwind.c (__collector_ext_unwind_init): Ditto. * src/collector_module.h: Ditto. --- gprofng/src/collector_module.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gprofng/src') diff --git a/gprofng/src/collector_module.h b/gprofng/src/collector_module.h index ebcdbca..fd888cd 100644 --- a/gprofng/src/collector_module.h +++ b/gprofng/src/collector_module.h @@ -110,7 +110,7 @@ typedef struct CollectorUtilFuncs long (*sysinfo)(int command, char *buf, long count); time_t (*time)(time_t *tloc); int (*unsetenv)(const char *name); - int (*vsnprintf)(char *str, size_t size, const char *format, va_list ap); + int (*vsnprintf)(char *str, size_t size, const char *format, ...); pid_t (*waitpid)(pid_t pid, int *stat_loc, int options); ssize_t (*write)(int, void *, size_t); double (*atof)(); -- cgit v1.1