https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66018
--- Comment #9 from Jonathan Wakely <redi at gcc dot gnu.org> --- I think the right solution is just to stop using AC_STRUCT_DIRENT_D_TYPE which expands to the opendir link test. The autoconf manual doesn't say anything about it doing a link test, I was only trying to find whether DIR.d_type exists :-(