diff options
| author | Sztergbaum Roman <roman.sztergbaum@epitech.eu> | 2018-05-18 21:46:34 +0200 |
|---|---|---|
| committer | Robert Schumacher <roschuma@microsoft.com> | 2018-05-18 12:46:34 -0700 |
| commit | b31cfb8b87d7548c10b2b04b7298c753b0af1521 (patch) | |
| tree | ea3fedc1edf633d3b9c107e9c64f6e81968c933d /toolsrc/src | |
| parent | aad8cbb041ff9d306273ff136f5b3ecd2821b929 (diff) | |
| download | vcpkg-b31cfb8b87d7548c10b2b04b7298c753b0af1521.tar.gz vcpkg-b31cfb8b87d7548c10b2b04b7298c753b0af1521.zip | |
fix compilation error on clang 6.0/APPLE (#3520)
* fix compilation error on clang 6.0/APPLE
* Update system.cpp
Diffstat (limited to 'toolsrc/src')
| -rw-r--r-- | toolsrc/src/vcpkg/base/system.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/toolsrc/src/vcpkg/base/system.cpp b/toolsrc/src/vcpkg/base/system.cpp index 4da4548af..73a92f2da 100644 --- a/toolsrc/src/vcpkg/base/system.cpp +++ b/toolsrc/src/vcpkg/base/system.cpp @@ -40,8 +40,9 @@ namespace vcpkg::System if (bytes == 0) std::abort(); return fs::path(buf, buf + bytes); #elif defined(__APPLE__) - uint32_t size = 1024 * 32; - char buf[size] = {}; + static constexpr const uint32_t buff_size = 1024 * 32; + uint32_t size = buff_size; + char buf[buff_size] = {}; bool result = _NSGetExecutablePath(buf, &size); Checks::check_exit(VCPKG_LINE_INFO, result != -1, "Could not determine current executable path."); std::unique_ptr<char> canonicalPath(realpath(buf, NULL)); |
