Seems the latest mingw-w64-headers have changed the definition for usage of localtime_r and other reentrant types breaking QT5 builds. I now get localtime_r was not declared in this scope when trying to build QT.
Adding -D_POSIX no longer works either since the guard has changed as well so its now #if defined(_POSIX_C_SOURCE) && !defined(_POSIX_THREAD_SAFE_FUNCTIONS)
I can fix this by adding #include <pthread_unistd.h> just before the _POSIX_THREAD_SAFE_FUNCTIONS guard below the above but im not sure this is the right approach.
better fix, by adding -D_POSIX_C_SOURCE to qmakespec like so BIGOBJ_FLAGS="-D_POSIX_C_SOURCE -Wa,-mbig-obj" it also builds.
another bug turned up in the latest git version. lrotl and lrotr defined in psdk_inc/intrin_impl.h collides with the same define in stdlib.h. i also filed a bug report to the mingw-w64 team.
Also the latest mariadb breaks building qt, exports are missing stdcall suffixes in the latest version which 32 bit qt cannot link to.
Closing. Hopefully this is fixed by now. If not, new tickets can be filed at GitHub.