mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2025-07-23 19:25:25 +03:00
24 lines
1.7 KiB
Diff
24 lines
1.7 KiB
Diff
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
|