Github user becrux commented on a diff in the pull request: https://github.com/apache/thrift/pull/628#discussion_r45579380 --- Diff: lib/cpp/test/TFileTransportTest.cpp --- @@ -91,19 +99,35 @@ class FsyncLog { class TempFile { public: TempFile(const char* directory, const char* prefix) { + #ifdef __MINGW32__ + size_t path_len = strlen(prefix) + 8; + path_ = new char[path_len]; + snprintf(path_, path_len, "%sXXXXXX", prefix); + if (_mktemp_s(path_,path_len) == 0) { + fd_ = open(path_,O_CREAT | O_RDWR | O_BINARY,S_IREAD | S_IWRITE); + if (fd_ < 0) { + throw apache::thrift::TException("_mktemp_s() failed"); + } + } else { + throw apache::thrift::TException("_mktemp_s() failed"); + } + #else --- End diff -- mkstemp is not available under MinGW-w64. _mktemp_s is the natural replacement. Unfortunately, MinGW-w64 headers do not provide an automatic define to replace _mktemp_s with mkstemp.
--- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---