diff options
author | fanquake <fanquake@gmail.com> | 2023-01-24 12:18:08 +0000 |
---|---|---|
committer | fanquake <fanquake@gmail.com> | 2023-04-03 14:44:48 +0100 |
commit | 54e406118926c2a526455a60f67961520dfb65da (patch) | |
tree | 43b6e14fa88356d40d576429d703fdac813eb1de /src/wallet/bdb.cpp | |
parent | 369d4c03b7084de967576759545ba36a17fc18bb (diff) | |
download | bitcoin-54e406118926c2a526455a60f67961520dfb65da.tar.xz |
refactor: don't avoid sys/types.h on when building for Windows
We've already used it unguarded in `httpserver.cpp` for years, with no
build issues.
Diffstat (limited to 'src/wallet/bdb.cpp')
-rw-r--r-- | src/wallet/bdb.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/wallet/bdb.cpp b/src/wallet/bdb.cpp index 5fafd478ee..dd425c1160 100644 --- a/src/wallet/bdb.cpp +++ b/src/wallet/bdb.cpp @@ -15,8 +15,15 @@ #include <stdint.h> -#ifndef WIN32 #include <sys/stat.h> + +// Windows may not define S_IRUSR or S_IWUSR. We define both +// here, with the same values as glibc (see stat.h). +#ifdef WIN32 +#ifndef S_IRUSR +#define S_IRUSR 0400 +#define S_IWUSR 0200 +#endif #endif namespace wallet { |