Skip to content
Snippets Groups Projects
Commit 3386477b authored by Damien George's avatar Damien George
Browse files

unix/modos: Allow to configure use of d_ino using _DIRENT_HAVE_D_INO.

Ports will need to #define _DIRENT_HAVE_D_INO (0) to disable d_ino use.
parent be3ae9d1
No related branches found
No related tags found
No related merge requests found
...@@ -184,7 +184,11 @@ STATIC mp_obj_t listdir_next(mp_obj_t self_in) { ...@@ -184,7 +184,11 @@ STATIC mp_obj_t listdir_next(mp_obj_t self_in) {
// DT_UNKNOWN should have 0 value on any reasonable system // DT_UNKNOWN should have 0 value on any reasonable system
t->items[1] = 0; t->items[1] = 0;
#endif #endif
#if !defined(_DIRENT_HAVE_D_INO) || _DIRENT_HAVE_D_INO
t->items[2] = MP_OBJ_NEW_SMALL_INT(dirent->d_ino); t->items[2] = MP_OBJ_NEW_SMALL_INT(dirent->d_ino);
#else
t->items[1] = MP_OBJ_NEW_SMALL_INT(0);
#endif
return MP_OBJ_FROM_PTR(t); 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