> I think we should better disable GNULIB_PORTCHECK on MinGW (I can hardly > imagine someone using that platform for those portability checks, and > I'm not sure I understand why this gets defined by default on other > platforms). The intent of GNULIB_PORTCHECK is that it is enabled by developers who want some simple build-time portability tests. It isn't suitable for people who just want to build the software, as there are too many build failures and other false alarms that builders don't care about. I installed the attached patch, to cause the problem to occur only if one configures explicitly with --enable-gcc-warnings. This should fix the problem that Richard reported. However, it won't fix the more general problem (which Richard should be able to reproduce via './configure --enable-gcc-warnings ...'). Apparently MSYS2 changed recently, and this caused _FORTIFY_SOURCE builds to fail. See, for example: https://github.com/msys2/MINGW-packages/issues/5803 I don't understand MSYS2 well enough to suggest fixes for Emacs, other than "don't configure with --enable-gcc-warnings and don't compile with _FORTIFY_SOURCE defined".