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
}

View File

@@ -499,6 +499,9 @@ rk_cloexec_file(FILE *);
ROKEN_LIB_FUNCTION void ROKEN_LIB_CALL
rk_cloexec_dir(DIR *);
ROKEN_LIB_FUNCTION void ROKEN_LIB_CALL
rk_cloexec_socket(rk_socket_t *);
ROKEN_LIB_FUNCTION int ROKEN_LIB_CALL
ct_memcmp(const void *, const void *, size_t);

View File

@@ -43,6 +43,7 @@ HEIMDAL_ROKEN_1.0 {
rk_cloexec;
rk_cloexec_file;
rk_cloexec_dir;
rk_cloexec_socket;
rk_closefrom;
rk_copyhostent;
rk_dns_free_data;