Skip to content

Commit 1ec0688

Browse files
committed
[lldb-mcp] Fix building for Windows
This fixes build errors like these: lldb/tools/lldb-mcp/lldb-mcp.cpp:45:41: error: use of undeclared identifier '_O_BINARY' 45 | int result = _setmode(fileno(stdout), _O_BINARY); | ^ lldb/tools/lldb-mcp/lldb-mcp.cpp:47:36: error: use of undeclared identifier '_O_BINARY' 47 | result = _setmode(fileno(stdin), _O_BINARY); | ^
1 parent 5f3e2b6 commit 1ec0688

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

lldb/tools/lldb-mcp/lldb-mcp.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,10 @@
1717
#include "llvm/Support/Signals.h"
1818
#include "llvm/Support/WithColor.h"
1919

20+
#if defined(_WIN32)
21+
#include <fcntl.h>
22+
#endif
23+
2024
using namespace lldb_protocol::mcp;
2125

2226
using lldb_private::File;

0 commit comments

Comments
 (0)