https://learn.microsoft.com/en-us/cpp/c-runtime-library/reference/mktemp-s-wmktemp-s?view=msvc-170 It looks like _mktemp_s can be an alternative [https://learn.microsoft.com/en-us/media/open-graph-image.png]<https://learn.microsoft.com/en-us/cpp/c-runtime-library/reference/mktemp-s-wmktemp-s?view=msvc-170> _mktemp_s, _wmktemp_s | Microsoft Learn<https://learn.microsoft.com/en-us/cpp/c-runtime-library/reference/mktemp-s-wmktemp-s?view=msvc-170> The nameTemplate argument has the form baseXXXXXX, where base is the part of the new file name that you supply and each X is a placeholder for a character supplied by _mktemp_s.Each placeholder character in nameTemplate must be an uppercase X. _mktemp_s preserves base and replaces the first trailing X with an alphabetic character._mktemp_s replaces the X characters that follow with a five ... learn.microsoft.com ________________________________ From: unlvsur unlvsur Sent: Friday, December 20, 2024 9:53 To: mjires@xxxxxxx <mjires@xxxxxxx>; gcc-help@xxxxxxxxxxx <gcc-help@xxxxxxxxxxx> Subject: Compilation Bugs caused by lto-wrapper changes for x86_64-w64-mingw32 /home/cqwrteur/toolchains_build/gcc/gcc/lockfile.cc:36:16: error: aggregate 'lockfile::lock_write()::flock s_flock' has incomplete type and cannot be defined 36 | struct flock s_flock; | ^~~~~~~ /home/cqwrteur/toolchains_build/gcc/gcc/lockfile.cc:42:20: error: 'F_WRLCK' was not declared in this scope 42 | s_flock.l_type = F_WRLCK; | ^~~~~~~ /home/cqwrteur/toolchains_build/gcc/gcc/lockfile.cc:44:21: error: 'F_SETLKW' was not declared in this scope 44 | while (fcntl (fd, F_SETLKW, &s_flock) && errno == EINTR) | ^~~~~~~~ /home/cqwrteur/toolchains_build/gcc/gcc/lockfile.cc:44:10: error: 'fcntl' was not declared in this scope 44 | while (fcntl (fd, F_SETLKW, &s_flock) && errno == EINTR) | ^~~~~ /home/cqwrteur/toolchains_build/gcc/gcc/lockfile.cc: In member function 'int lockfile::try_lock_write()': /home/cqwrteur/toolchains_build/gcc/gcc/lockfile.cc:61:16: error: aggregate 'lockfile::try_lock_write()::flock s_flock' has incomplete type and cannot be defined 61 | struct flock s_flock; | ^~~~~~~ /home/cqwrteur/toolchains_build/gcc/gcc/lockfile.cc:67:20: error: 'F_WRLCK' was not declared in this scope 67 | s_flock.l_type = F_WRLCK; | ^~~~~~~ /home/cqwrteur/toolchains_build/gcc/gcc/lockfile.cc:69:18: error: 'F_SETLK' was not declared in this scope 69 | if (fcntl (fd, F_SETLK, &s_flock) == -1) | ^~~~~~~ /home/cqwrteur/toolchains_build/gcc/gcc/lockfile.cc:69:7: error: 'fcntl' was not declared in this scope 69 | if (fcntl (fd, F_SETLK, &s_flock) == -1) | ^~~~~ /home/cqwrteur/toolchains_build/gcc/gcc/lockfile.cc: In member function 'int lockfile::lock_read()': /home/cqwrteur/toolchains_build/gcc/gcc/lockfile.cc:91:16: error: aggregate 'lockfile::lock_read()::flock s_flock' has incomplete type and cannot be defined 91 | struct flock s_flock; | ^~~~~~~ /home/cqwrteur/toolchains_build/gcc/gcc/lockfile.cc:97:20: error: 'F_RDLCK' was not declared in this scope 97 | s_flock.l_type = F_RDLCK; | ^~~~~~~ /home/cqwrteur/toolchains_build/gcc/gcc/lockfile.cc:99:21: error: 'F_SETLKW' was not declared in this scope 99 | while (fcntl (fd, F_SETLKW, &s_flock) && errno == EINTR) | ^~~~~~~~ /home/cqwrteur/toolchains_build/gcc/gcc/lockfile.cc:99:10: error: 'fcntl' was not declared in this scope 99 | while (fcntl (fd, F_SETLKW, &s_flock) && errno == EINTR) | ^~~~~ /home/cqwrteur/toolchains_build/gcc/gcc/lockfile.cc: In member function 'void lockfile::unlock()': /home/cqwrteur/toolchains_build/gcc/gcc/lockfile.cc:112:20: error: aggregate 'lockfile::unlock()::flock s_flock' has incomplete type and cannot be defined 112 | struct flock s_flock; | ^~~~~~~ /home/cqwrteur/toolchains_build/gcc/gcc/lockfile.cc:118:24: error: 'F_UNLCK' was not declared in this scope; did you mean 'LK_UNLCK'? 118 | s_flock.l_type = F_UNLCK; | ^~~~~~~ | LK_UNLCK /home/cqwrteur/toolchains_build/gcc/gcc/lockfile.cc:120:18: error: 'F_SETLK' was not declared in this scope 120 | fcntl (fd, F_SETLK, &s_flock); | ^~~~~~~ /home/cqwrteur/toolchains_build/gcc/gcc/lockfile.cc:120:7: error: 'fcntl' was not declared in this scope 120 | fcntl (fd, F_SETLK, &s_flock); | ^~~~~ make[1]: *** [Makefile:1208: lockfile.o] Error 1 make[1]: *** Waiting for unfinished jobs.... /home/cqwrteur/toolchains_build/gcc/gcc/lto-wrapper.cc: In function 'void run_gcc(unsigned int, char**)': /home/cqwrteur/toolchains_build/gcc/gcc/lto-wrapper.cc:1878:20: error: 'mkstemps' was not declared in this scope; did you mean 'mkstemp'? 1878 | int fd = mkstemps (file, strlen (".ltrans.out")); | ^~~~~~~~ | mkstemp /home/cqwrteur/toolchains_build/gcc/gcc/lto-wrapper.cc:2249:27: error: 'link' was not declared in this scope; did you mean 'unlink'? 2249 | if (link (output_name, output_name_link) != EEXIST) | ^~~~ | unlink make[1]: *** [Makefile:1208: lto-wrapper.o] Error 1 rm gfdl.pod gcc.pod gcov-dump.pod gcov-tool.pod fsf-funding.pod gpl.pod cpp.pod gcov.pod lto-dump.pod make[1]: Leaving directory '/home/cqwrteur/toolchains_build/toolchainbuildscripts/gccbuild/x86_64-w64-mingw32/.gnuartifacts/x86_64-w64-mingw32/hostbuild/x86_64-w64-mingw32/gcc/gcc' make: *** [Makefile:4722: all-gcc] Error 2 make all-gcc failed