diff options
Diffstat (limited to 'butl/filesystem')
-rw-r--r-- | butl/filesystem | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/butl/filesystem b/butl/filesystem index 565f465..780779f 100644 --- a/butl/filesystem +++ b/butl/filesystem @@ -5,14 +5,21 @@ #ifndef BUTL_FILESYSTEM #define BUTL_FILESYSTEM -#include <sys/types.h> // mode_t - #ifndef _WIN32 # include <dirent.h> // DIR #else # include <stddef.h> // intptr_t #endif +// VC's sys/types.h header file doesn't define mode_t type. So let's define it +// ourselves according to the POSIX specification. +// +#ifndef _MSC_VER +# include <sys/types.h> // mode_t +#else + typedef int mode_t; +#endif + #include <cstddef> // ptrdiff_t #include <cstdint> // uint16_t #include <utility> // move() |