Skip to content

Commit 419b9d9

Browse files
committed
Fix compiling on Windows.
1 parent c72481b commit 419b9d9

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

win32_compat.h

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,12 +40,20 @@ extern "C" {
4040
#define S_ISDIR(mode) (((mode) & S_IFMT) == S_IFDIR)
4141
#endif
4242

43+
#ifndef S_IRUSR
44+
#define S_IRUSR _S_IREAD
45+
#endif
46+
47+
#ifndef S_IWUSR
48+
#define S_IWUSR _S_IWRITE
49+
#endif
50+
4351
#ifndef HOST_TYPE
4452
#if _WIN64
4553
#define HOST_TYPE "Win64"
4654
#elif WIN32
4755
#define HOST_TYPE "Win32"
48-
#endif
56+
#endif
4957
#endif
5058

5159

0 commit comments

Comments
 (0)