roken: introduce rk_cloexec_socket

Accepts type rk_socket_t and is a no-op on Windows

Change-Id: I82755872e86ef36445e60054dd752279aaceb6d1
This commit is contained in:
Jeffrey Altman
2013-08-19 10:21:23 -04:00
parent 5930b387de
commit 3f1d795758
3 changed files with 13 additions and 0 deletions

View File

@@ -64,3 +64,12 @@ rk_cloexec_dir(DIR * d)
rk_cloexec(dirfd(d));
#endif
}
void ROKEN_LIB_FUNCTION
rk_cloexec_socket(rk_socket_t s)
{
#ifndef _WIN32
rk_cloexec((int)s);
#endif
}