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;


        
_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to