File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -184,7 +184,7 @@ STATIC mp_obj_t listdir_next(mp_obj_t self_in) {
184184 // DT_UNKNOWN should have 0 value on any reasonable system
185185 t -> items [1 ] = MP_OBJ_NEW_SMALL_INT (0 );
186186 #endif
187- #if !defined( _DIRENT_HAVE_D_INO ) || _DIRENT_HAVE_D_INO
187+ #ifdef _DIRENT_HAVE_D_INO
188188 t -> items [2 ] = MP_OBJ_NEW_SMALL_INT (dirent -> d_ino );
189189 #else
190190 t -> items [2 ] = MP_OBJ_NEW_SMALL_INT (0 );
Original file line number Diff line number Diff line change @@ -259,3 +259,8 @@ extern const struct _mp_obj_fun_builtin_t mp_builtin_open_obj;
259259#ifndef _DIRENT_HAVE_D_TYPE
260260#define _DIRENT_HAVE_D_TYPE (1)
261261#endif
262+ // This macro is not provided by glibc but we need it so ports that don't have
263+ // dirent->d_ino can disable the use of this field.
264+ #ifndef _DIRENT_HAVE_D_INO
265+ #define _DIRENT_HAVE_D_INO (1)
266+ #endif
Original file line number Diff line number Diff line change 3535#define MICROPY_PY_SYS_PLATFORM "freedos"
3636
3737// djgpp dirent struct does not have d_ino field
38- #define _DIRENT_HAVE_D_INO (0)
38+ #undef _DIRENT_HAVE_D_INO
You can’t perform that action at this time.
0 commit comments