diff options
author | Damien George <damien.p.george@gmail.com> | 2015-12-16 13:21:09 +0000 |
---|---|---|
committer | Damien George <damien.p.george@gmail.com> | 2015-12-16 13:21:09 +0000 |
commit | 3386477b297251c0ba83e6cf13fe9aaddcac57fa (patch) | |
tree | 0f65f4eceba0f97d134288f2e624f20efeed6db9 /unix/modos.c | |
parent | be3ae9d13c81e6c6d1702e789c1f5ce5f2f72aa9 (diff) |
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.
Diffstat (limited to 'unix/modos.c')
-rw-r--r-- | unix/modos.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/unix/modos.c b/unix/modos.c index 9293d59d0..83b24c05c 100644 --- a/unix/modos.c +++ b/unix/modos.c @@ -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 t->items[1] = 0; #endif + #if !defined(_DIRENT_HAVE_D_INO) || _DIRENT_HAVE_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); } |