mirror of
https://github.com/microsoft/vcpkg.git
synced 2025-01-18 20:03:02 +08:00
[vcpkg] Fix warning on Apple (#5333)
Return type of _NSGetExecutablePath is int rather than bool [1], causing a warning on Apple. [1] https://developer.apple.com/library/archive/documentation/System/Conceptual/ManPages_iPhoneOS/man3/dyld.3.html
This commit is contained in:
parent
4cbd210154
commit
d82f37b4bf
@ -30,7 +30,7 @@ namespace vcpkg::System
|
||||
static constexpr const uint32_t buff_size = 1024 * 32;
|
||||
uint32_t size = buff_size;
|
||||
char buf[buff_size] = {};
|
||||
bool result = _NSGetExecutablePath(buf, &size);
|
||||
int 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));
|
||||
Checks::check_exit(VCPKG_LINE_INFO, result != -1, "Could not determine current executable path.");
|
||||
|
Loading…
Reference in New Issue
Block a user