From 40d1855fe9107af8bee87c5e0cdf5bd6c434c8ff Mon Sep 17 00:00:00 2001 From: Jisi Liu Date: Fri, 11 Aug 2017 12:52:45 -0700 Subject: Fix mkdir --- src/google/protobuf/stubs/io_win32.h | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'src/google') diff --git a/src/google/protobuf/stubs/io_win32.h b/src/google/protobuf/stubs/io_win32.h index 2cd53a5e..63a52cac 100644 --- a/src/google/protobuf/stubs/io_win32.h +++ b/src/google/protobuf/stubs/io_win32.h @@ -45,11 +45,12 @@ #ifndef GOOGLE_PROTOBUF_STUBS_IO_WIN32_H__ #define GOOGLE_PROTOBUF_STUBS_IO_WIN32_H__ -#if defined(_MSC_VER) +#if defined(_WIN32) #include #include +#ifdef _MSC_VER namespace google { namespace protobuf { namespace internal { @@ -74,6 +75,9 @@ LIBPROTOBUF_EXPORT std::wstring testonly_path_to_winpath( } // namespace internal } // namespace protobuf } // namespace google +#else // _MSC_VER +#define mkdir(name, mode) mkdir(name) +#endif // !_MSC_VER #ifndef W_OK #define W_OK 02 // not defined by MSVC for whatever reason @@ -91,7 +95,7 @@ LIBPROTOBUF_EXPORT std::wstring testonly_path_to_winpath( #define STDOUT_FILENO 1 #endif -#endif // defined(_MSC_VER) +#endif // defined(_WIN32) #endif // GOOGLE_PROTOBUF_STUBS_IO_WIN32_H__ -- cgit v1.2.3