Skip to content

Commit c765a07

Browse files
sebhubfjtrujy
authored andcommitted
ftw: Fix incompatible pointer types error
This fixes a compile error with GCC 15.
1 parent 5e5e51f commit c765a07

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

newlib/libc/posix/ftw.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,9 @@ int ftw(const char *path, int (*fn)(const char *, const struct stat *, int), int
3030
/* The following cast assumes that calling a function with one
3131
* argument more than it needs behaves as expected. This is
3232
* actually undefined, but works on all real-world machines. */
33-
return nftw(path, (int (*)())fn, fd_limit, FTW_PHYS);
33+
return nftw(path,
34+
(int (*)(const char *, const struct stat *, int, struct FTW *))fn,
35+
fd_limit, FTW_PHYS);
3436
}
3537

3638
#endif /* ! HAVE_OPENDIR */

0 commit comments

Comments
 (0)