summaryrefslogtreecommitdiff
path: root/include/my_dir.h
diff options
context:
space:
mode:
authorSergey Vojtovich <svoj@mariadb.org>2017-07-06 10:39:21 +0400
committerSergey Vojtovich <svoj@mariadb.org>2017-07-06 10:39:21 +0400
commit4e08cdf52a8767d44ab3761936b2f0d0d71173ab (patch)
tree00f8d9b789756f25a347adcb4509a16f29a796df /include/my_dir.h
parent7e6a600d139f6820d157c2e52fe3fe1004097e08 (diff)
downloadmariadb-git-4e08cdf52a8767d44ab3761936b2f0d0d71173ab.tar.gz
Fixed build failure on Windows
Diffstat (limited to 'include/my_dir.h')
-rw-r--r--include/my_dir.h13
1 files changed, 10 insertions, 3 deletions
diff --git a/include/my_dir.h b/include/my_dir.h
index c65b4441f07..949a9a4d354 100644
--- a/include/my_dir.h
+++ b/include/my_dir.h
@@ -35,9 +35,16 @@ extern "C" {
#define MY_S_ISUID S_ISUID /* set user id on execution */
#define MY_S_ISGID S_ISGID /* set group id on execution */
#define MY_S_ISVTX S_ISVTX /* save swapped text even after use */
-#define MY_S_IREAD S_IRUSR /* read permission, owner */
-#define MY_S_IWRITE S_IWUSR /* write permission, owner */
-#define MY_S_IEXEC S_IXUSR /* execute/search permission, owner */
+
+#ifndef S_IREAD
+#define MY_S_IREAD S_IRUSR /* read permission, owner */
+#define MY_S_IWRITE S_IWUSR /* write permission, owner */
+#define MY_S_IEXEC S_IXUSR /* execute/search permission, owner */
+#else
+#define MY_S_IREAD S_IREAD /* read permission, owner */
+#define MY_S_IWRITE S_IWRITE /* write permission, owner */
+#define MY_S_IEXEC S_IEXEC /* execute/search permission, owner */
+#endif
#define MY_S_ISDIR(m) (((m) & MY_S_IFMT) == MY_S_IFDIR)
#define MY_S_ISCHR(m) (((m) & MY_S_IFMT) == MY_S_IFCHR)