[Lldb-commits] [lldb] 1ec0688 - [lldb-mcp] Fix building for Windows
Martin Storsjö via lldb-commits
lldb-commits at lists.llvm.org
Thu Aug 28 05:23:17 PDT 2025
Author: Martin Storsjö
Date: 2025-08-28T15:21:24+03:00
New Revision: 1ec06886a4a0dac110e93aef027697734b8013ab
URL: https://github.com/llvm/llvm-project/commit/1ec06886a4a0dac110e93aef027697734b8013ab
DIFF: https://github.com/llvm/llvm-project/commit/1ec06886a4a0dac110e93aef027697734b8013ab.diff
LOG: [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);
| ^
Added:
Modified:
lldb/tools/lldb-mcp/lldb-mcp.cpp
Removed:
################################################################################
diff --git a/lldb/tools/lldb-mcp/lldb-mcp.cpp b/lldb/tools/lldb-mcp/lldb-mcp.cpp
index 42daabbe4da2f..1f82af94820da 100644
--- a/lldb/tools/lldb-mcp/lldb-mcp.cpp
+++ b/lldb/tools/lldb-mcp/lldb-mcp.cpp
@@ -17,6 +17,10 @@
#include "llvm/Support/Signals.h"
#include "llvm/Support/WithColor.h"
+#if defined(_WIN32)
+#include <fcntl.h>
+#endif
+
using namespace lldb_protocol::mcp;
using lldb_private::File;
More information about the lldb-commits
mailing list