[PATCH 2/4] lib/glob/glob.c: fix build failure when multibyte support is
From:
Shubham Chakraborty
Subject:
[PATCH 2/4] lib/glob/glob.c: fix build failure when multibyte support is disabled
Date:
Mon, 13 Jul 2026 15:35:24 +0530
When multibyte support is disabled (e.g. uClibc without wide character
support), wint_t is undefined. This causes a compilation error in
lib/glob/glob.c which uses wint_t in external declarations.
This fixes the following failure seen with br-arm-basic toolchain:
In file included from glob.c:1016:
glob_loop.c: In function 'internal_glob_pattern_p':
glob_loop.c:52:18: error: 'wint_t' undeclared (first use in this function)
Signed-off-by: Shubham Chakraborty <chakrabortyshubham66@gmail.com>
---
lib/glob/glob.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/lib/glob/glob.c b/lib/glob/glob.c
index 4681f58..67ab5af 100644
--- a/lib/glob/glob.c
+++ b/lib/glob/glob.c
@@ -120,10 +120,14 @@ static char **glob_dir_to_array (char *, char **, int);
/* Make sure these names continue to agree with what's in smatch.c */
extern char *glob_patscan (char *, char *, int, int);
+#if HANDLE_MULTIBYTE
extern wchar_t *glob_patscan_wc (wchar_t *, wchar_t *, wint_t, int);
+#endif
/* And this from gmisc.c/gm_loop.c */
+#if HANDLE_MULTIBYTE
extern int wextglob_pattern_p (wchar_t *);
+#endif
extern char *glob_dirscan (char *, int);
--
2.55.0