Add rk_cloexec_dir() to lib/roken

This commit is contained in:
Asanka Herath
2009-12-22 14:03:39 -05:00
parent ff11a8ae43
commit 68cfbb7e19
6 changed files with 18 additions and 6 deletions

View File

@@ -56,3 +56,11 @@ rk_cloexec_file(FILE *f)
rk_cloexec(fileno(f));
#endif
}
void ROKEN_LIB_FUNCTION
rk_cloexec_dir(DIR * d)
{
#ifdef HAVE_DIRFD
rk_cloexec(dirfd(d));
#endif
}