Skip to content

Commit

Permalink
[Flang] Fix compilation on MinGW-w64
Browse files Browse the repository at this point in the history
Reviewed By: Meinersbur

Differential Revision: https://reviews.llvm.org/D94707
  • Loading branch information
MehdiChinoune authored and Meinersbur committed Feb 18, 2021
1 parent a0c9ec1 commit 8cfe9c0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion flang/runtime/file.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion flang/tools/flang-driver/driver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ int main(int argc_, const char **argv_) {
// information if possible.
isCrash = CommandRes < 0;
#ifdef _WIN32
IsCrash |= CommandRes == 3;
isCrash |= CommandRes == 3;
#endif
if (isCrash) {
theDriver.generateCompilationDiagnostics(*c, *failingCommand);
Expand Down

0 comments on commit 8cfe9c0

Please sign in to comment.