mirror of
https://git.eden-emu.dev/eden-emu/eden.git
synced 2026-09-17 08:37:43 +00:00
@@ -20,9 +20,8 @@ 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, char *err_str);
|
||||
template<const char*> std::string HandleStrerrorR(const char* r, char *) {
|
||||
return std::string{r};
|
||||
}
|
||||
template<char*> std::string HandleStrerrorR(const char* r, char *) { return std::string{r}; }
|
||||
template<char const*> std::string HandleStrerrorR(const char* r, char *) { return std::string{r}; }
|
||||
template<int> std::string HandleStrerrorR(int r, char *err_str) {
|
||||
return std::string{r != 0
|
||||
? "(strerror_r failed to format error)"
|
||||
|
||||
Reference in New Issue
Block a user