libc: Fix glob.c build with GCC

We don't expose the dummy struct pointer in the header file, so
gl_errblk is just a void * when lacking compiler support for blocks and
we need to cast to the former for CALL_BLOCK to work. If blocks support
is present this should be a redundant cast to the type that gl_errblk
already is.

Fixes:	1e0743f54d ("glob: Add blocks support")
This commit is contained in:
Jessica Clarke
2025-06-03 15:19:04 +01:00
parent 680f1a39ee
commit 786ced56a4
+2 -1
View File
@@ -1121,7 +1121,8 @@ err_aborted(glob_t *pglob, int err, char *buf)
if ((pglob->gl_flags & _GLOB_ERR_BLOCK) != 0) {
if (pglob->gl_errblk != NULL)
rv = CALL_BLOCK(pglob->gl_errblk, buf, errno);
rv = CALL_BLOCK((glob_b_block)pglob->gl_errblk, buf,
errno);
} else if (pglob->gl_errfunc != NULL) {
rv = pglob->gl_errfunc(buf, errno);
}