Skip to content
This repository was archived by the owner on Jan 26, 2024. It is now read-only.

Commit a2f3814

Browse files
committed
Fix Windows legacy LLVM build
The os.hpp header gets added to the include path of legacy llvm via the compiler lib. Having "windows.h" included causes a lot conflicts with LLVM headers, as they forward declare many Windows types. Best to not include it here. Change-Id: I60c44a8d28660368f1a4a95741e1053ef3528fa1
1 parent b35a2ea commit a2f3814

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

os/os.hpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@
3333

3434
#ifdef _WIN32
3535
#include <Basetsd.h> // For KAFFINITY
36-
#include <windows.h>
3736
#endif // _WIN32
3837

3938
// Smallest supported VM page size.
@@ -56,7 +55,7 @@ class Os : AllStatic {
5655

5756
// File Desc abstraction between OS
5857
#if defined(_WIN32)
59-
typedef HANDLE FileDesc;
58+
typedef void* FileDesc;
6059
#else
6160
typedef int FileDesc;
6261
#endif
@@ -104,7 +103,7 @@ class Os : AllStatic {
104103
#if defined(__linux__)
105104
return -1;
106105
#else
107-
return INVALID_HANDLE_VALUE;
106+
return reinterpret_cast<void*>(-1);
108107
#endif
109108
}
110109

0 commit comments

Comments
 (0)