[ccing bug-gnulib; this is about .] > The latest changes made this code run even in the MinGW build, not > sure why (perhaps because 'getrandom' uses 'open'?). That's part of it. It's also needed for recent changes to the getloadavg module. And I see that the at-internal module also depends on the 'open' module, I presume because lib/openat-proc.c opens /proc/self/fd/NNN/, but this surely won't work in mingw. As I understand it the basic issue here is that we want O_CLOEXEC support even on platforms that lack it, and we don't want all the calling software to play games with "#ifdef O_CLOEXEC" and the like. I attempted to work around this particular problem by installing the attached workaround into Gnulib and updating Emacs accordingly. Please give it a try. Perhaps this should be fixed more systematically in Gnulib instead of worked around, but I suppose that might entail some merging between Emacs's and Gnulib's ways of dealing with file names under MS-Windows and I'll leave it to the MS-Windows experts to figure out how to do that, or whether they want to do it at all.