Преглед изворни кода

Guard unistd.h with MacOS only macro

Fix compile error on Windows caused by #4877
Weird, I thought I saw this guard during the code review...
Weiyi Wang пре 7 година
родитељ
комит
0580112940
1 измењених фајлова са 3 додато и 1 уклоњено
  1. 3 1
      src/yuzu/main.cpp

+ 3 - 1
src/yuzu/main.cpp

@@ -6,7 +6,9 @@
 #include <clocale>
 #include <memory>
 #include <thread>
-#include <unistd.h>
+#ifdef __APPLE__
+#include <unistd.h> // for chdir
+#endif
 
 // VFS includes must be before glad as they will conflict with Windows file api, which uses defines.
 #include "applets/error.h"