2026-09-17 00:02:36

Signed-off-by: lizzie <lizzie@eden-emu.dev>
This commit is contained in:
lizzie
2026-09-17 00:02:36 +00:00
parent f57c210a5f
commit c95773e20a
+3 -3
View File
@@ -19,11 +19,11 @@ namespace Common {
// glibc, mlibc, musl, and newlib all define their own variants of strerror_r
// We don't need to use the preprocessor, we can just select depending on return type
template<typename T> std::string HandleStrerrorR(T r, int e, char *err_str, size_t n);
template<const char*> std::string HandleStrerrorR(const char* r, int e, char *err_str, size_t n) {
template<typename T> std::string HandleStrerrorR(T r, char *err_str);
template<const char*> std::string HandleStrerrorR(const char* r, char *) {
return std::string{r};
}
template<int> std::string HandleStrerrorR(int r, int e, char *err_str, size_t n) {
template<int> std::string HandleStrerrorR(int r, char *err_str) {
return std::string{r != 0
? "(strerror_r failed to format error)"
: err_str};