Skip to content
Snippets Groups Projects
Commit 1a811ce1 authored by Anon's avatar Anon
Browse files

micropython: remove _DIRENT_HAVE_D_TYPE and _DIRENT_HAVE_D_INO guards

parent 480ab2af
No related branches found
No related tags found
1 merge request!105py: Create file manager app
......@@ -206,7 +206,6 @@ STATIC mp_obj_t vfs_posix_ilistdir_it_iternext(mp_obj_t self_in) {
t->items[0] = mp_obj_new_bytes((const byte *)fn, strlen(fn));
}
#ifdef _DIRENT_HAVE_D_TYPE
#ifdef DTTOIF
t->items[1] = MP_OBJ_NEW_SMALL_INT(DTTOIF(dirent->d_type));
#else
......@@ -218,16 +217,8 @@ STATIC mp_obj_t vfs_posix_ilistdir_it_iternext(mp_obj_t self_in) {
t->items[1] = MP_OBJ_NEW_SMALL_INT(dirent->d_type);
}
#endif
#else
// DT_UNKNOWN should have 0 value on any reasonable system
t->items[1] = MP_OBJ_NEW_SMALL_INT(0);
#endif
#ifdef _DIRENT_HAVE_D_INO
t->items[2] = MP_OBJ_NEW_SMALL_INT(dirent->d_ino);
#else
t->items[2] = MP_OBJ_NEW_SMALL_INT(0);
#endif
return MP_OBJ_FROM_PTR(t);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment