https://gcc.gnu.org/bugzilla/show_bug.cgi?id=19089

--- Comment #4 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Something like after the access check has passed:

#ifdef S_ISDIR
struct stat s;
if (stat(dir, &s) <0)
  return NULL;
if (!S_ISDIR (s.st_mode))
  return NULL;
#endif

Reply via email to