Commit c6fc522
committed
lib/misc.c: fix build against -std=c23 (
gcc-15 switched to -std=c23 by default:
https://gcc.gnu.org/git/?p=gcc.git;a=commitdiff;h=55e3bd376b2214e200fa76d12b67ff259b06c212
As a result `lsof` fails the build as:
misc.c:390:26: error: too many arguments to function 'r_fn'
390 | rv = r_fn(r_arg, r.r_rbuf, r_rbln);
| ^~~~
Before C23 `int (*)()` meant any function that returns `int`. In `C23`
if means only `int (*)(void)`. But `lsof` alwaus uses
`int (*)(char *path, char *buf, int len)` in that place. Switched to
explicit function type instead.void (*)()) changed the meaning)1 parent 96f4cc5 commit c6fc522
1 file changed
Lines changed: 3 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
56 | 56 | | |
57 | 57 | | |
58 | 58 | | |
59 | | - | |
| 59 | + | |
60 | 60 | | |
61 | 61 | | |
62 | 62 | | |
| |||
259 | 259 | | |
260 | 260 | | |
261 | 261 | | |
262 | | - | |
| 262 | + | |
263 | 263 | | |
264 | 264 | | |
265 | 265 | | |
| |||
321 | 321 | | |
322 | 322 | | |
323 | 323 | | |
324 | | - | |
| 324 | + | |
325 | 325 | | |
326 | 326 | | |
327 | 327 | | |
| |||
0 commit comments