Improve compatibility with Windows.

Fixes #5287
This commit is contained in:
Gunnar Beutner 2013-12-09 13:46:53 +01:00
parent 085fca90ad
commit af6df9f268
1 changed files with 2 additions and 2 deletions

View File

@ -750,7 +750,7 @@ tm Utility::LocalTime(time_t ts)
#ifdef _MSC_VER #ifdef _MSC_VER
tm *result = localtime(&ts); tm *result = localtime(&ts);
if (temp == NULL) { if (result == NULL) {
BOOST_THROW_EXCEPTION(posix_error() BOOST_THROW_EXCEPTION(posix_error()
<< boost::errinfo_api_function("localtime") << boost::errinfo_api_function("localtime")
<< boost::errinfo_errno(errno)); << boost::errinfo_errno(errno));
@ -768,4 +768,4 @@ tm Utility::LocalTime(time_t ts)
return result; return result;
#endif /* _MSC_VER */ #endif /* _MSC_VER */
} }