[lldb-dap] Fix error C2065: 'PATH_MAX': undeclared identifier

This should fix the Windows build.
This commit is contained in:
Jonas Devlieghere
2025-02-24 12:15:32 -06:00
parent 9638d08af9
commit 51ce6c437f
2 changed files with 10 additions and 7 deletions

View File

@@ -12,6 +12,15 @@
#include "LLDBUtils.h"
#include "lldb/API/SBFileSpec.h"
#if defined(_WIN32)
#define NOMINMAX
#include <windows.h>
#ifndef PATH_MAX
#define PATH_MAX MAX_PATH
#endif
#endif
namespace lldb_dap {
static void SendThreadExitedEvent(DAP &dap, lldb::tid_t tid) {

View File

@@ -80,6 +80,7 @@
#include <windows.h>
#undef GetObject
#include <io.h>
typedef int socklen_t;
#else
#include <netinet/in.h>
#include <sys/socket.h>
@@ -91,13 +92,6 @@
#include <sys/prctl.h>
#endif
#if defined(_WIN32)
#ifndef PATH_MAX
#define PATH_MAX MAX_PATH
#endif
typedef int socklen_t;
#endif
using namespace lldb_dap;
using lldb_private::NativeSocket;
using lldb_private::Socket;