Skip to content

Commit b272609

Browse files
authored
Merge pull request #327 from trofi/gcc-15-c23
lib/misc.c: fix build against -std=c23 (`void (*)()`) changed the mea…
2 parents 96f4cc5 + c6fc522 commit b272609

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

lib/misc.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ static void closePipes(void);
5656
static int dolstat(char *path, char *buf, int len);
5757
static int dostat(char *path, char *buf, int len);
5858
static int doreadlink(char *path, char *buf, int len);
59-
static int doinchild(struct lsof_context *ctx, int (*fn)(), char *fp,
59+
static int doinchild(struct lsof_context *ctx, int (*fn)(char *path, char *buf, int len), char *fp,
6060
char *rbuf, int rbln);
6161

6262
#if defined(HASINTSIGNAL)
@@ -259,7 +259,7 @@ void closefrom_shim(struct lsof_context *ctx, int low) {
259259
*/
260260

261261
static int doinchild(struct lsof_context *ctx,
262-
int (*fn)(), /* function to perform */
262+
int (*fn)(char *path, char *buf, int len), /* function to perform */
263263
char *fp, /* function parameter */
264264
char *rbuf, /* response buffer */
265265
int rbln) /* response buffer length */
@@ -321,7 +321,7 @@ static int doinchild(struct lsof_context *ctx,
321321
*/
322322
struct stat _;
323323
} r;
324-
int (*r_fn)();
324+
int (*r_fn)(char *path, char *buf, int len);
325325
/*
326326
* Close sufficient open file descriptors except Pipes[0] and
327327
* Pipes[3].

0 commit comments

Comments
 (0)