1 /* ISC license. */ 2 3 #include <errno.h> 4 #include <skalibs/direntry.h> 5 dir_close(DIR * dir)6 void dir_close (DIR *dir) 7 { 8 int e = errno ; 9 for (;;) 10 { 11 if (closedir(dir) == 0) break ; 12 if (errno != EINTR) break ; 13 } 14 errno = e ; 15 } 16