Fixes for macOS/Linux

This commit is contained in:
Luke Street 2021-06-30 16:21:20 -04:00
parent 603e066eed
commit 6b73240364
2 changed files with 3 additions and 1 deletions

View File

@ -338,7 +338,7 @@ static inline int Stat(const char* path, Sstat* statout) {
return _wstat64(wpath.get(), statout);
}
#else
static inline int Mkdir(const char* path, mode_t mode) { return CreateDirectoryA(path, mode); }
static inline int Mkdir(const char* path, mode_t mode) { return mkdir(path, mode); }
typedef struct stat Sstat;
static inline int Stat(const char* path, Sstat* statout) { return stat(path, statout); }

View File

@ -5,7 +5,9 @@
#include <dirent.h>
#endif
#ifdef __cpp_lib_ranges
#include <ranges>
#endif
#include <sys/stat.h>
#if !defined(S_ISREG) && defined(S_IFMT) && defined(S_IFREG)