[Flang] Fix compilation on MinGW-w64
Reviewed By: Meinersbur
Differential Revision: https://reviews.llvm.org/D94707
GitOrigin-RevId: 8cfe9c02a0430e604bfec520caaea0e5d61ed399
diff --git a/runtime/file.cpp b/runtime/file.cpp
index fa59567..73b7a24 100644
--- a/runtime/file.cpp
+++ b/runtime/file.cpp
@@ -14,12 +14,12 @@
#include <cstring>
#include <fcntl.h>
#include <stdlib.h>
+#include <sys/stat.h>
#ifdef _WIN32
#define NOMINMAX
#include <io.h>
#include <windows.h>
#else
-#include <sys/stat.h>
#include <unistd.h>
#endif
diff --git a/tools/flang-driver/driver.cpp b/tools/flang-driver/driver.cpp
index e003200..19ac6df 100644
--- a/tools/flang-driver/driver.cpp
+++ b/tools/flang-driver/driver.cpp
@@ -131,7 +131,7 @@
// information if possible.
isCrash = CommandRes < 0;
#ifdef _WIN32
- IsCrash |= CommandRes == 3;
+ isCrash |= CommandRes == 3;
#endif
if (isCrash) {
theDriver.generateCompilationDiagnostics(*c, *failingCommand);