https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104217
--- Comment #6 from Andrew Pinski <pinskia at gcc dot gnu.org> --- so the cygwin libraries include secure_getenv but the header file defines it only when __GNU_VISIBLE is true. Someone who knows cygwin headers can better help here than me really. But I think libstdc++ checks only if secure_getenv is in the library and not the header .... Having it check the include might be useful too.