diff --git a/mongoose.h b/mongoose.h index e14694f0..80db5e6b 100644 --- a/mongoose.h +++ b/mongoose.h @@ -219,7 +219,7 @@ static inline void *mg_calloc(size_t cnt, size_t size) { return p; } -#if MG_ENABLE_POSIX_FS +#if !defined(MG_ENABLE_POSIX_FS) || !MG_ENABLE_POSIX_FS #else #define mkdir(a, b) mg_mkdir(a, b) static inline int mg_mkdir(const char *path, mode_t mode) { diff --git a/src/arch_freertos.h b/src/arch_freertos.h index cbf7ba9b..7443e69f 100644 --- a/src/arch_freertos.h +++ b/src/arch_freertos.h @@ -37,7 +37,7 @@ static inline void *mg_calloc(size_t cnt, size_t size) { return p; } -#if MG_ENABLE_POSIX_FS +#if !defined(MG_ENABLE_POSIX_FS) || !MG_ENABLE_POSIX_FS #else #define mkdir(a, b) mg_mkdir(a, b) static inline int mg_mkdir(const char *path, mode_t mode) {