This regression has arisen in the interval between my last commit on WSL master, and current HEAD on WSL 4.0-dev.
setup.cpp is a C++ source component for mingw-get-setup.exe; when I attempt to compile it today, after updating my headers to 4.0-dev HEAD, I see:
setup.cpp: In function `bool mkdir_default(wchar_t*)': setup.cpp:540: error: `_wmkdir' was not declared in this scope setup.cpp: In function `void rmdir_default(const wchar_t*, const wchar_t*)': setup.cpp:565: error: `_wrmdir' was not declared in this scope
_wmkdir should be prototyped when either direct.h or wchar.h is included.
Likewise, according to:
_wrmdir should be prototyped when either of this same pair of headers is included.
setup.cpp includes wchar.h; it does not include direct.h; (the regression is masked, if I do also include direct.h, so it appears to arise explicitly in wchar.h).