https://sourceware.org/bugzilla/show_bug.cgi?id=32373
Bug ID: 32373 Summary: gprofng: sysinfo interception needs porting to Linux from Solaris Product: binutils Version: unspecified Status: NEW Severity: normal Priority: P2 Component: gprofng Assignee: vladimir.mezentsev at oracle dot com Reporter: sam at gentoo dot org Target Milestone: --- In gprofng/libcollector/libcol_util.c, we have: ``` ptr = dlsym (libc, "sysinfo"); if (ptr) __collector_util_funcs.sysinfo = (long (*)())ptr; else { CALL_UTIL (fprintf)(stderr, "collector_util_init COL_ERROR_UTIL_INIT sysinfo: %s\n", dlerror ()); err = COL_ERROR_UTIL_INIT; } ``` This came up when porting gprofng to C23 (GCC 15 now defaults to -std=gnu23) and I noticed that the prototype we expect is different on Linux: ``` gprofng/src/collector_module.h:110: long (*sysinfo)(int command, char *buf, long count); ``` That's the Solaris prototype, see https://docs.oracle.com/cd/E86824_01/html/E54765/sysinfo-2.html. On Linux, it seems to be `int sysinfo(struct sysinfo *info)`. -- You are receiving this mail because: You are on the CC list for the bug.