Skip to content

Commit

Permalink
[FOLD] Re-add call to _ftime() for Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
scottschurr committed Jan 23, 2018
1 parent 052705d commit a4a8279
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions src/ripple/app/main/Main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,10 @@
#include <utility>
#include <stdexcept>

#ifdef _MSC_VER
#include <sys/types.h>
#include <sys/timeb.h>
#endif

#if BOOST_VERSION >= 106400
#define HAS_BOOST_PROCESS 1
Expand Down Expand Up @@ -588,6 +592,21 @@ int run (int argc, char** argv)
int main (int argc, char** argv)
{
#ifdef _MSC_VER
{
// Work around for https://svn.boost.org/trac/boost/ticket/10657
// Reported against boost version 1.56.0. If an application's
// first call to GetTimeZoneInformation is from a coroutine, an
// unhandled exception is generated. A workaround is to call
// GetTimeZoneInformation at least once before launching any
// coroutines. At the time of this writing the _ftime call is
// used to initialize the timezone information.
struct _timeb t;
#ifdef _INC_TIME_INL
_ftime_s (&t);
#else
_ftime (&t);
#endif
}
ripple::sha512_deprecatedMSVCWorkaround();
#endif

Expand Down

0 comments on commit a4a8279

Please sign in to comment.