This patch had been applied in wine https://source.winehq.org/git/wine.git/commitdiff/2f05dd0719e7dc51b48397cf441e139a0c9c0ec3 mingw-w64 https://sourceforge.net/p/mingw-w64/mingw-w64/ci/aaec44a4cea27f1ee1212d82c76e1ab510f7ed49/