diff --git a/third_party/sqlite-objstore/src/backend_fs_common.c b/third_party/sqlite-objstore/src/backend_fs_common.c index 06eb0c75..8eab28d0 100644 --- a/third_party/sqlite-objstore/src/backend_fs_common.c +++ b/third_party/sqlite-objstore/src/backend_fs_common.c @@ -2,6 +2,7 @@ #if defined(_WIN32) #include "win_dirent.h" +#include "win_posix.h" #else #include #endif diff --git a/third_party/sqlite-objstore/src/win_posix.h b/third_party/sqlite-objstore/src/win_posix.h index 85c0e89d..04d400bc 100644 --- a/third_party/sqlite-objstore/src/win_posix.h +++ b/third_party/sqlite-objstore/src/win_posix.h @@ -51,6 +51,12 @@ #define LOCK_NB 4 #define LOCK_UN 8 #endif +#ifndef S_ISDIR +#define S_ISDIR(m) (((m) & _S_IFMT) == _S_IFDIR) +#endif +#ifndef S_ISREG +#define S_ISREG(m) (((m) & _S_IFMT) == _S_IFREG) +#endif #ifdef __cplusplus extern "C" {