summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSteven Murdoch <Steven.Murdoch@cl.cam.ac.uk>2010-11-20 13:50:55 +0000
committerNick Mathewson <nickm@torproject.org>2010-11-21 15:27:50 -0500
commit38da44cbf4b5cfe0802c1647c0efc6f2aeb0e821 (patch)
tree33f3021a6eb216e6fac76ee124827eee70d056d0
parentb4f56dd4c6483933d06b382ab4e4a956b238f783 (diff)
downloadtor-38da44cbf4b5cfe0802c1647c0efc6f2aeb0e821.tar.gz
tor-38da44cbf4b5cfe0802c1647c0efc6f2aeb0e821.zip
Fix compile error on MacOS X (and other platforms without O_CLOEXEC)
-rw-r--r--src/common/compat.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/common/compat.c b/src/common/compat.c
index 42602fb3a3..07d961812c 100644
--- a/src/common/compat.c
+++ b/src/common/compat.c
@@ -112,7 +112,7 @@ tor_open_cloexec(const char *path, int flags, unsigned mode)
int fd = open(path, flags, mode);
#ifdef FD_CLOEXEC
if (fd >= 0)
- fcntl(s, F_SETFD, FD_CLOEXEC);
+ fcntl(fd, F_SETFD, FD_CLOEXEC);
#endif
return fd;
#endif