That was a mail at typo, I used the macro you typed.
A linker flag about multiple definitions was already set by postgresql build scripts: -Wl,--allow-multiple-definition
Yes I could understand that the idea of _CRTALIAS was to generate a solution for the symbol using the macro expansion.
But linker was still complaining about the missing symbol __findfirst undefined at libmingwex.a and I do not know why it was unable to translate the CRTALIAS macro expanded to the inline version and link properly.
That why I posted here and glad to hear good lessons for the mingw.
Unfortunely there is more in C that I could easily understand.

I currently set the --prefix=/usr that is my common choice on a Linux station.
I trying to build here in the same way that on a Linux terminal.
Will replace to other path name.
Better to learn more before try create a fix that do some useful changes.
I will go the hints for the _stat case.