[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[or-cvs] [tor/master 4/9] Fix compile error on MacOS X (and other platforms without O_CLOEXEC)



Author: Steven Murdoch <Steven.Murdoch@xxxxxxxxxxxx>
Date: Sat, 20 Nov 2010 13:50:55 +0000
Subject: Fix compile error on MacOS X (and other platforms without O_CLOEXEC)
Commit: 9d63dfcf49924fad573109c80dfa881c19cfe195

---
 src/common/compat.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/common/compat.c b/src/common/compat.c
index 42602fb..07d9618 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
-- 
1.7.1