1
0
mirror of https://github.com/janet-lang/janet synced 2025-10-28 06:07:43 +00:00

Support for systems missing O_CLOEXEC

This commit is contained in:
Jason Pepas
2020-06-26 14:40:49 -05:00
parent 6a187a384b
commit f9f90ba1d6
2 changed files with 2 additions and 1 deletions

View File

@@ -112,7 +112,7 @@ typedef struct {
#endif
static JanetStream *make_stream(int fd, int flags) {
JanetStream *stream = janet_abstract(&StreamAT, sizeof(JanetStream));
#ifndef SOCK_CLOEXEC
#if !defined(SOCK_CLOEXEC) && !defined(JANET_NO_CLOEXEC)
int extra = O_CLOEXEC;
#else
int extra = 0;