1
1
mirror of https://github.com/rui314/mold.git synced 2024-10-05 00:57:08 +03:00

Fix macOS build

This commit is contained in:
Rui Ueyama 2022-01-03 18:05:33 +09:00
parent ce2fee10b5
commit 7bb478b683

View File

@ -19,7 +19,7 @@ std::string_view errno_string() {
// always write an error message to a given buffer.
if (std::is_same<decltype(strerror_r(errno, buf, sizeof(buf))), char *>::value)
return strerror_r(errno, buf, sizeof(buf));
return (char *)(uintptr_t)strerror_r(errno, buf, sizeof(buf));
strerror_r(errno, buf, sizeof(buf));
return buf;
}