소스 검색

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