The branch main has been updated by jrtc27:

URL: 
https://cgit.FreeBSD.org/src/commit/?id=786ced56a43443400c12b73323a9f1da7b3db2ba

commit 786ced56a43443400c12b73323a9f1da7b3db2ba
Author:     Jessica Clarke <jrt...@freebsd.org>
AuthorDate: 2025-06-03 14:19:04 +0000
Commit:     Jessica Clarke <jrt...@freebsd.org>
CommitDate: 2025-06-03 14:19:04 +0000

    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:  1e0743f54d2d ("glob: Add blocks support")
---
 lib/libc/gen/glob.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/lib/libc/gen/glob.c b/lib/libc/gen/glob.c
index 1ac919edaa12..921db0a7b5a8 100644
--- a/lib/libc/gen/glob.c
+++ b/lib/libc/gen/glob.c
@@ -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);
        }

Reply via email to