https://gcc.gnu.org/bugzilla/show_bug.cgi?id=123037 --- Comment #7 from Eric Botcazou <ebotcazou at gcc dot gnu.org> --- <stdlib.h> is in the closure of "mingw32.h" for me. What version of MINGW64 do you use?