Skip to content

Commit f047d43

Browse files
authored
fix: include unistd.h on macOS to expose mkdtemp in filesystem.cc (#12187)
1 parent 9460d67 commit f047d43

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

tests/cpp/filesystem.cc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,10 @@
99

1010
#if !defined(xgboost_IS_WIN)
1111

12+
#if defined(__APPLE__)
13+
#include <unistd.h> // for mkdtemp on macOS
14+
#endif
15+
1216
#include <cstdlib> // for mkdtemp
1317

1418
#include "../../src/common/error_msg.h" // for SystemError

0 commit comments

Comments
 (0)