From fb936f89b8cb16d7e8f1fd73a527099616db74fb Mon Sep 17 00:00:00 2001 From: kinichiro Date: Sat, 28 Jan 2017 02:30:16 +0900 Subject: [PATCH] Move S_IRGRP and S_IROTH from fcntl.h to sys/stat.h - S_IRGRP and S_IROTH should be defined in sys/stat.h rather than fcntl.h - Old MinGW64 on Ubuntu 14.04 appears not to have S_IRGRP and S_IROTH - MinGW64 has __WIN32 defined but does not have _MSC_VER defined --- include/compat/fcntl.h | 8 -------- include/compat/sys/stat.h | 9 +++++++++ 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/include/compat/fcntl.h b/include/compat/fcntl.h index feddb7b..7dfedc6 100644 --- a/include/compat/fcntl.h +++ b/include/compat/fcntl.h @@ -30,11 +30,3 @@ #ifndef FD_CLOEXEC #define FD_CLOEXEC 1 #endif - -#ifndef S_IRGRP -#define S_IRGRP 0 -#endif - -#ifndef S_IROTH -#define S_IROTH 0 -#endif diff --git a/include/compat/sys/stat.h b/include/compat/sys/stat.h index 0e04553..629c7fe 100644 --- a/include/compat/sys/stat.h +++ b/include/compat/sys/stat.h @@ -8,6 +8,15 @@ #ifndef _MSC_VER #include_next + +/* for old MinGW */ +#ifndef S_IRGRP +#define S_IRGRP 0 +#endif +#ifndef S_IROTH +#define S_IROTH 0 +#endif + #else #include