From a2f5ce74211f87fae57530ca80bc5499d9e2e0b0 Mon Sep 17 00:00:00 2001 From: Orgad Shaneh Date: Sun, 14 Jun 2026 18:27:48 +0300 Subject: [PATCH] Fix test build on mingw mingw headers do have mkdtemp in stdlib.h. --- src/test.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/test.cc b/src/test.cc index aab6996e..8cbfa97c 100644 --- a/src/test.cc +++ b/src/test.cc @@ -47,8 +47,8 @@ using namespace std; namespace { -#ifdef _WIN32 -/// Windows has no mkdtemp. Implement it in terms of _mktemp_s. +#ifdef _MSC_VER +/// MSVC has no mkdtemp. Implement it in terms of _mktemp_s. char* mkdtemp(char* name_template) { int err = _mktemp_s(name_template, strlen(name_template) + 1); if (err < 0) { @@ -64,7 +64,7 @@ char* mkdtemp(char* name_template) { return name_template; } -#endif // _WIN32 +#endif // _MSC_VER string GetSystemTempDir() { #ifdef _WIN32