X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=libs%2Fpbd%2Flocaltime_r.cc;h=fc16fb08b5f2d2bb179af759ed572d0b912c6b92;hb=c046b7c9d36d54600907565271a8ea2ceb004300;hp=c72e3eb4584cda14a87be3c710562176bc765c3c;hpb=2e27e21d3a09889311e18a8efe11abcaa6d9c8b3;p=ardour.git diff --git a/libs/pbd/localtime_r.cc b/libs/pbd/localtime_r.cc index c72e3eb458..fc16fb08b5 100644 --- a/libs/pbd/localtime_r.cc +++ b/libs/pbd/localtime_r.cc @@ -39,3 +39,19 @@ localtime_r(const time_t *const timep, struct tm *p_tm) } #endif + +#ifdef __MINGW64__ + struct tm * +__cdecl localtime(const long int *_Time) +{ + if (_Time == NULL) + { + return localtime((const time_t *const)NULL); // Unpredictable behavior in case of _Time == NULL; + } + else + { + const time_t tempTime = *_Time; + return localtime(&tempTime); + } +} +#endif