[PATCH] dirent.h: use __flexarr instead of hardcoding [1] length
Etienne Brateau
etienne.brateau@gmail.com
Thu Feb 13 18:13:40 GMT 2025
The old definition prevent building gnulib 9.2 (file lib/fts.c) with
error strict-flex-arrays when checking for ISDOT when building Hurd.
Signed-off-by: Etienne Brateau <etienne.brateau@gmail.com>
---
bits/dirent.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/bits/dirent.h b/bits/dirent.h
index 9a91b17f26..45fa486636 100644
--- a/bits/dirent.h
+++ b/bits/dirent.h
@@ -32,7 +32,7 @@ struct dirent
unsigned char d_namlen; /* Length of the file name. */
/* Only this member is in the POSIX standard. */
- char d_name[1]; /* File name (actually longer). */
+ char d_name __flexarr; /* File name. */
};
#ifdef __USE_LARGEFILE64
--
2.48.1
More information about the Libc-alpha
mailing list