This commit to mingw-w64 broke compatibility with emacs-head because of the OS_NT conflict: In file included from w32image.c:32: w32common.h:45:3: error: expected identifier before numeric constant 45 | OS_NT | ^~~~~ https://sourceforge.net/p/mingw-w64/mingw-w64/ci/dc7ef298837d4581200a3bed660aed36818c1b00/ The series of patches in attachments should fix the issue: - the first one should cause the build to fail in the future instead of silent overriding definition; - the second patch renames OS_9X to conform mingw-w64 naming; - the third actually fixes build failure (preserving backward compatibility); Best regards, Konstantin Shabanov