aboutsummaryrefslogtreecommitdiffstats
path: root/testing/lldb/musl-include-limits.h.patch
blob: 3cc0dd6325e61e7dc0e1a941181b4694bc8d0e5f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
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