Skip to content

Commit 41910f7

Browse files
authored
[lldb-dap] Fix build failure on Windows. (llvm#125156)
A previous change is triggering a failure due to SOCKET not being defined in IOStream.h. Adjusting the Windows includes to correct the imports and using a more narrow import (winsock2.h vs windows.h). Also removed a stale comment. Tested this on an x86_64 wins 11 vm. This should fix https://lab.llvm.org/buildbot/#/builders/197/builds/1379 and https://lab.llvm.org/buildbot/#/builders/141/builds/5878
1 parent 6f6d808 commit 41910f7

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

lldb/tools/lldb-dap/IOStream.h

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,8 @@
1010
#define LLDB_TOOLS_LLDB_DAP_IOSTREAM_H
1111

1212
#if defined(_WIN32)
13-
// We need to #define NOMINMAX in order to skip `min()` and `max()` macro
14-
// definitions that conflict with other system headers.
15-
// We also need to #undef GetObject (which is defined to GetObjectW) because
16-
// the JSON code we use also has methods named `GetObject()` and we conflict
17-
// against these.
18-
#define NOMINMAX
19-
#include <windows.h>
13+
#include "lldb/Host/windows/windows.h"
14+
#include <winsock2.h>
2015
#else
2116
typedef int SOCKET;
2217
#endif

0 commit comments

Comments
 (0)