Skip to content

Commit bc55f4f

Browse files
authored
[debugserver] Fix debugserver build on < macOS 10.15 (#166599)
The VM_MEMORY_SANITIZER constant was added in macOs 10.15 and friends. Support using the constant on older OSes. Fixes #156144
1 parent d3caae1 commit bc55f4f

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

lldb/tools/debugserver/source/MacOSX/MachVMRegion.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,12 @@
1414
#include "DNBLog.h"
1515
#include <cassert>
1616
#include <mach/mach_vm.h>
17+
#include <mach/vm_statistics.h>
18+
19+
// From <mach/vm_statistics.h>, but not on older OSs.
20+
#ifndef VM_MEMORY_SANITIZER
21+
#define VM_MEMORY_SANITIZER 99
22+
#endif
1723

1824
MachVMRegion::MachVMRegion(task_t task)
1925
: m_task(task), m_addr(INVALID_NUB_ADDRESS), m_err(),

0 commit comments

Comments
 (0)