mirror of
https://github.com/encounter/newlib.git
synced 2026-07-10 12:18:44 -07:00
set d_type for readdir_r too
This commit is contained in:
@@ -207,6 +207,7 @@ int readdir_r(DIR *dirp, struct dirent *entry, struct dirent **result) {
|
||||
|
||||
strncpy (entry->d_name, filename, sizeof(entry->d_name));
|
||||
entry->d_ino = st.st_ino;
|
||||
entry->d_type = S_ISDIR(st.st_mode)?DT_DIR:DT_REG;
|
||||
|
||||
*result = entry;
|
||||
return 0;
|
||||
|
||||
Reference in New Issue
Block a user