Skip to content

Commit

Permalink
Fix incorrect strerror() call for FreeBSD
Browse files Browse the repository at this point in the history
  • Loading branch information
GuillaumeHolley authored Nov 20, 2023
1 parent 30f54f5 commit 50d70c5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/strict_fstream.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ static std::string strerror()
} else {
return "Unknown error (" + std::to_string(err_num) + ")";
}
#elif ((_POSIX_C_SOURCE >= 200112L || _XOPEN_SOURCE >= 600) && ! _GNU_SOURCE) || defined(__APPLE__) || defined(__MUSL__)
#elif ((_POSIX_C_SOURCE >= 200112L || _XOPEN_SOURCE >= 600) && ! _GNU_SOURCE) || defined(__APPLE__) || defined(__MUSL__) || defined(__FreeBSD__)
// XSI-compliant strerror_r()
const int err_num = errno; // See above
if (strerror_r(err_num, buff.data(), buff.size()) == 0) {
Expand Down

0 comments on commit 50d70c5

Please sign in to comment.