Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 3 Jun 2025 14:21:07 GMT
From:      Jessica Clarke <jrtc27@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
Subject:   git: 786ced56a434 - main - libc: Fix glob.c build with GCC
Message-ID:  <202506031421.553EL7wr024762@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by jrtc27:

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

commit 786ced56a43443400c12b73323a9f1da7b3db2ba
Author:     Jessica Clarke <jrtc27@FreeBSD.org>
AuthorDate: 2025-06-03 14:19:04 +0000
Commit:     Jessica Clarke <jrtc27@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);
 	}



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202506031421.553EL7wr024762>