Skip to content

Commit 4e08cdf

Browse files
committed
Fixed build failure on Windows
1 parent 7e6a600 commit 4e08cdf

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

include/my_dir.h

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,16 @@ extern "C" {
3535
#define MY_S_ISUID S_ISUID /* set user id on execution */
3636
#define MY_S_ISGID S_ISGID /* set group id on execution */
3737
#define MY_S_ISVTX S_ISVTX /* save swapped text even after use */
38-
#define MY_S_IREAD S_IRUSR /* read permission, owner */
39-
#define MY_S_IWRITE S_IWUSR /* write permission, owner */
40-
#define MY_S_IEXEC S_IXUSR /* execute/search permission, owner */
38+
39+
#ifndef S_IREAD
40+
#define MY_S_IREAD S_IRUSR /* read permission, owner */
41+
#define MY_S_IWRITE S_IWUSR /* write permission, owner */
42+
#define MY_S_IEXEC S_IXUSR /* execute/search permission, owner */
43+
#else
44+
#define MY_S_IREAD S_IREAD /* read permission, owner */
45+
#define MY_S_IWRITE S_IWRITE /* write permission, owner */
46+
#define MY_S_IEXEC S_IEXEC /* execute/search permission, owner */
47+
#endif
4148

4249
#define MY_S_ISDIR(m) (((m) & MY_S_IFMT) == MY_S_IFDIR)
4350
#define MY_S_ISCHR(m) (((m) & MY_S_IFMT) == MY_S_IFCHR)

0 commit comments

Comments
 (0)