From 2d23a7d634762e17d4ff7b57c4e34c23efacae42 Mon Sep 17 00:00:00 2001 From: troky Date: Mon, 7 Jul 2014 18:58:26 +0200 Subject: [PATCH] Added missing permission flags to Windows build #333 --- compat.h | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/compat.h b/compat.h index c52f80b7..c4404c86 100644 --- a/compat.h +++ b/compat.h @@ -14,6 +14,29 @@ #include + +#if !defined S_ISDIR && defined S_IFDIR +# define S_ISDIR(mode) (((mode) & S_IFMT) == S_IFDIR) +#endif +#if !S_IRUSR && S_IREAD +# define S_IRUSR S_IREAD +#endif +#if !S_IRUSR +# define S_IRUSR 00400 +#endif +#if !S_IWUSR && S_IWRITE +# define S_IWUSR S_IWRITE +#endif +#if !S_IWUSR +# define S_IWUSR 00200 +#endif +#if !S_IXUSR && S_IEXEC +# define S_IXUSR S_IEXEC +#endif +#if !S_IXUSR +# define S_IXUSR 00100 +#endif + #ifndef HAVE_LIBWINPTHREAD static inline int nanosleep(const struct timespec *req, struct timespec *rem) {