diff options
author | Nick Mathewson <nickm@torproject.org> | 2010-12-01 11:42:34 -0500 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2010-12-01 11:42:34 -0500 |
commit | 9908404f0189aad3917960ba63661079e546f150 (patch) | |
tree | 58e8d682c2945a55071580b053f24d3999bd641c /src/common/compat.h | |
parent | fa1a4196225bcdc787342ee6f60c4f6ccdfe1879 (diff) | |
parent | a961521a86c439ab2ba1073daa6392a069903db1 (diff) | |
download | tor-9908404f0189aad3917960ba63661079e546f150.tar.gz tor-9908404f0189aad3917960ba63661079e546f150.zip |
Merge remote branch 'sjmurdoch/cloexec'
Diffstat (limited to 'src/common/compat.h')
-rw-r--r-- | src/common/compat.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/common/compat.h b/src/common/compat.h index 38e0f99ba9..590da949c0 100644 --- a/src/common/compat.h +++ b/src/common/compat.h @@ -51,6 +51,8 @@ #include <netinet6/in6.h> #endif +#include <stdio.h> + #if defined (WINCE) #include <fcntl.h> #include <io.h> @@ -340,6 +342,9 @@ struct tm *tor_gmtime_r(const time_t *timep, struct tm *result); ((tvp)->tv_sec cmp (uvp)->tv_sec)) /* ===== File compatibility */ +int tor_open_cloexec(const char *path, int flags, unsigned mode); +FILE *tor_fopen_cloexec(const char *path, const char *mode); + int replace_file(const char *from, const char *to); int touch_file(const char *fname); |