aboutsummaryrefslogtreecommitdiffstats
path: root/testing/lldb/musl-include-limits.h.patch
diff options
context:
space:
mode:
Diffstat (limited to 'testing/lldb/musl-include-limits.h.patch')
-rw-r--r--testing/lldb/musl-include-limits.h.patch24
1 files changed, 24 insertions, 0 deletions
diff --git a/testing/lldb/musl-include-limits.h.patch b/testing/lldb/musl-include-limits.h.patch
new file mode 100644
index 0000000000..3cc0dd6325
--- /dev/null
+++ b/testing/lldb/musl-include-limits.h.patch
@@ -0,0 +1,24 @@
+This patch fixes error when building with clang++:
+
+ [159/862] Building CXX object source/Host/CMakeFiles/lldbHost.dir/common/FileSpec.cpp.o
+ FAILED: source/Host/CMakeFiles/lldbHost.dir/common/FileSpec.cpp.o
+ /usr/bin/clang++ -DHAVE_PROCESS_VM_READV -DHAVE_ROUND -DLIBXML2_DEFINED -DLLDB_DISABLE_LIBEDIT -DLLDB_USE_BUILTIN_DEMANGLER -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -Isource/Host -I../source/Host -I../include -Iinclude -I/usr/lib/llvm4/include -I/usr/include/python2.7 -I../tools/clang/include -I../clang/include -I/usr/include/libxml2 -I../source/. -I../source/Plugins/Process/Linux -I../source/Plugins/Process/POSIX -Os -fomit-frame-pointer -fPIC -fvisibility-inlines-hidden -Werror=date-time -std=c++11 -fcolor-diagnostics -ffunction-sections -fdata-sections -Wno-deprecated-declarations -Wno-unknown-pragmas -Wno-strict-aliasing -Wno-deprecated-register -Wno-vla-extension -O3 -DNDEBUG -fno-exceptions -MD -MT source/Host/CMakeFiles/lldbHost.dir/common/FileSpec.cpp.o -MF source/Host/CMakeFiles/lldbHost.dir/common/FileSpec.cpp.o.d -o source/Host/CMakeFiles/lldbHost.dir/common/FileSpec.cpp.o -c ../source/Host/common/FileSpec.cpp
+ ../source/Host/common/FileSpec.cpp:92:22: error: use of undeclared identifier 'PATH_MAX'
+ char resolved_path[PATH_MAX];
+ ^
+ ../source/Host/common/FileSpec.cpp:675:17: error: use of undeclared identifier 'PATH_MAX'
+ char path_buf[PATH_MAX];
+ ^
+ ...
+ 8 errors generated.
+
+--- a/source/Host/common/FileSpec.cpp
++++ b/source/Host/common/FileSpec.cpp
+@@ -9,6 +9,7 @@
+
+ #ifndef _WIN32
+ #include <dirent.h>
++#include <limits.h>
+ #else
+ #include "lldb/Host/windows/windows.h"
+ #endif