@ -184,7 +184,7 @@ STATIC mp_obj_t listdir_next(mp_obj_t self_in) {
// DT_UNKNOWN should have 0 value on any reasonable system
t->items[1] = MP_OBJ_NEW_SMALL_INT(0);
#endif
#if !defined(_DIRENT_HAVE_D_INO) || _DIRENT_HAVE_D_INO
#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);
@ -259,3 +259,8 @@ extern const struct _mp_obj_fun_builtin_t mp_builtin_open_obj;
#ifndef _DIRENT_HAVE_D_TYPE
#define _DIRENT_HAVE_D_TYPE (1)
// This macro is not provided by glibc but we need it so ports that don't have
// dirent->d_ino can disable the use of this field.
#ifndef _DIRENT_HAVE_D_INO
#define _DIRENT_HAVE_D_INO (1)
@ -35,4 +35,4 @@
#define MICROPY_PY_SYS_PLATFORM "freedos"
// djgpp dirent struct does not have d_ino field
#define _DIRENT_HAVE_D_INO (0)
#undef _DIRENT_HAVE_D_INO