forked from HowardHinnant/date
Fix gcc -O -D_FORTIFY_SOURCE.
This commit is contained in:
committed by
Howard Hinnant
parent
1fd0806757
commit
a4eef8e20c
3
tz.cpp
3
tz.cpp
@@ -3134,7 +3134,8 @@ current_zone()
|
||||
{
|
||||
std::ostringstream os;
|
||||
char message[128];
|
||||
(void)strerror_r(errno, message, 128);
|
||||
if (strerror_r(errno, message, sizeof(message)) != 0)
|
||||
message[0] = '\0';
|
||||
os << "realpath failure: errno = " << errno << "; " << message;
|
||||
throw std::runtime_error(os.str());
|
||||
}
|
||||
|
Reference in New Issue
Block a user