diff options
-rw-r--r-- | dir.c | 10 |
1 files changed, 8 insertions, 2 deletions
@@ -187,12 +187,18 @@ has_nonascii(const char *ptr, size_t len) # define IF_NORMALIZE_UTF8PATH(something) /* nothing */ #endif -#ifndef IFTODT +#if defined(IFTODT) && defined(DT_UNKNOWN) +# define EMULATE_IFTODT 0 +#else +# define EMULATE_IFTODT 1 +#endif + +#if EMULATE_IFTODT # define IFTODT(m) (((m) & S_IFMT) / ((~S_IFMT & (S_IFMT-1)) + 1)) #endif typedef enum { -#ifdef DT_UNKNOWN +#if !EMULATE_IFTODT path_exist = DT_UNKNOWN, path_directory = DT_DIR, path_regular = DT_REG, |