mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2025-02-25 23:21:38 +01:00
Fix compile error on MacOS X (and other platforms without O_CLOEXEC)
This commit is contained in:
parent
b4f56dd4c6
commit
38da44cbf4
1 changed files with 1 additions and 1 deletions
|
@ -112,7 +112,7 @@ tor_open_cloexec(const char *path, int flags, unsigned mode)
|
||||||
int fd = open(path, flags, mode);
|
int fd = open(path, flags, mode);
|
||||||
#ifdef FD_CLOEXEC
|
#ifdef FD_CLOEXEC
|
||||||
if (fd >= 0)
|
if (fd >= 0)
|
||||||
fcntl(s, F_SETFD, FD_CLOEXEC);
|
fcntl(fd, F_SETFD, FD_CLOEXEC);
|
||||||
#endif
|
#endif
|
||||||
return fd;
|
return fd;
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Add table
Reference in a new issue