From c56fb088ef94f6af19377e39ddbbe7beb11a0e9d Mon Sep 17 00:00:00 2001 From: obarthel Date: Thu, 17 Jul 2025 11:48:29 +0200 Subject: [PATCH] The new "d_type" field of the "struct dirent" is available if the _DIRENT_HAVE_D_TYPE macro is defined --- library/include/dirent.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/library/include/dirent.h b/library/include/dirent.h index 6266266..dbff5d9 100644 --- a/library/include/dirent.h +++ b/library/include/dirent.h @@ -69,6 +69,13 @@ typedef long DIR; /****************************************************************************/ +/* The POSIX requirements for the 'struct dirent' cover little more than + * the 'd_ino' and 'd_name' fields. Because it is useful, the 'd_type' + * field identifies the type of object in question. This was added with + * clib2 1.217 (10.7.2025), and you can find out if the 'd_type' field + * is available in the 'struct dirent' by checking if the + * _DIRENT_HAVE_D_TYPE macro is defined. + */ struct dirent { ino_t d_ino;