Преглед на файлове

Fix compile error on MacOS X (and other platforms without O_CLOEXEC)

Steven Murdoch преди 15 години
родител
ревизия
38da44cbf4
променени са 1 файла, в които са добавени 1 реда и са изтрити 1 реда
  1. 1 1
      src/common/compat.c

+ 1 - 1
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