diff --git a/.github/workflows/ccpp.yml b/.github/workflows/ccpp.yml index a3e2ff387..341a1e713 100644 --- a/.github/workflows/ccpp.yml +++ b/.github/workflows/ccpp.yml @@ -31,12 +31,12 @@ jobs: - uses: msys2/setup-msys2@v2 with: update: true - msystem: MINGW32 + msystem: UCRT64 install: >- make - mingw-w64-i686-gcc - mingw-w64-i686-lua - mingw-w64-i686-nsis + mingw-w64-ucrt-x86_64-gcc + mingw-w64-ucrt-x86_64-lua + mingw-w64-ucrt-x86_64-nsis ninja bison flex diff --git a/mach/proto/as/comm4.c b/mach/proto/as/comm4.c index 756f2d4c0..a521fe85f 100644 --- a/mach/proto/as/comm4.c +++ b/mach/proto/as/comm4.c @@ -16,6 +16,7 @@ #include "comm1.h" #include "y.tab.h" #include "object.h" +#include extern YYSTYPE yylval; @@ -142,10 +143,17 @@ pass_1(int argc, char **argv) #endif tempfile = tmpfile(); + if (!tempfile) + fatal("couldn't create temporary file: %s", strerror(errno)); + #ifdef LISTING listmode = dflag; if (listmode & 0440) + { listfile = tmpfile(); + if (!listfile) + fatal("couldn't create temporary file: %s", strerror(errno)); + } #endif for (ip = keytab; ip->i_type; ip++) item_insert(ip, H_KEY+hash(ip->i_name));