mirror of
https://github.com/cemu-project/vcpkg.git
synced 2025-02-26 14:56:55 +00:00
fix compilation error on clang 6.0/APPLE (#3520)
* fix compilation error on clang 6.0/APPLE * Update system.cpp
This commit is contained in:
parent
aad8cbb041
commit
b31cfb8b87
@ -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));
|
||||
|
Loading…
x
Reference in New Issue
Block a user