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

unix: Change define logic of _DIRENT_HAVE_D_INO to match other macros.

parent 64a909ef
Branches
No related tags found
No related merge requests found
...@@ -184,7 +184,7 @@ STATIC mp_obj_t listdir_next(mp_obj_t self_in) { ...@@ -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 // DT_UNKNOWN should have 0 value on any reasonable system
t->items[1] = MP_OBJ_NEW_SMALL_INT(0); t->items[1] = MP_OBJ_NEW_SMALL_INT(0);
#endif #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); t->items[2] = MP_OBJ_NEW_SMALL_INT(dirent->d_ino);
#else #else
t->items[2] = MP_OBJ_NEW_SMALL_INT(0); 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; ...@@ -259,3 +259,8 @@ extern const struct _mp_obj_fun_builtin_t mp_builtin_open_obj;
#ifndef _DIRENT_HAVE_D_TYPE #ifndef _DIRENT_HAVE_D_TYPE
#define _DIRENT_HAVE_D_TYPE (1) #define _DIRENT_HAVE_D_TYPE (1)
#endif #endif
// 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)
#endif
...@@ -35,4 +35,4 @@ ...@@ -35,4 +35,4 @@
#define MICROPY_PY_SYS_PLATFORM "freedos" #define MICROPY_PY_SYS_PLATFORM "freedos"
// djgpp dirent struct does not have d_ino field // djgpp dirent struct does not have d_ino field
#define _DIRENT_HAVE_D_INO (0) #undef _DIRENT_HAVE_D_INO
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment