From dac72966b82dc3c114ca7648246557bfbdaa9fb6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Filipe=20Brand=C3=A3o?= Date: Fri, 23 Feb 2024 14:19:32 +0000 Subject: [PATCH] Fix: mkdtemp is not available for macOS --- nl-writer2/src/nl-solver.cc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/nl-writer2/src/nl-solver.cc b/nl-writer2/src/nl-solver.cc index 48a32d689..e188b349b 100644 --- a/nl-writer2/src/nl-solver.cc +++ b/nl-writer2/src/nl-solver.cc @@ -554,6 +554,9 @@ void NLSolver::InitAutoStub() { if (!std::filesystem::create_directory(pathstr_)) Utils().myexit("Could not create temp dir '" + pathstr_ + "'"); +#elif __APPLE__ + if (!std::filesystem::create_directory(pathstr_)) + Utils().myexit("Could not create temp dir '" + pathstr_ + "'"); #else if (!mkdtemp((char*)pathstr_.c_str())) Utils().myexit("Could not create a temp dir\n"