mirror of
https://github.com/janet-lang/janet
synced 2024-11-28 19:19:53 +00:00
Merge pull request #432 from cellularmitosis/no_cloexec
Support for systems missing O_CLOEXEC
This commit is contained in:
commit
1b0d6de735
@ -112,7 +112,7 @@ typedef struct {
|
|||||||
#endif
|
#endif
|
||||||
static JanetStream *make_stream(int fd, int flags) {
|
static JanetStream *make_stream(int fd, int flags) {
|
||||||
JanetStream *stream = janet_abstract(&StreamAT, sizeof(JanetStream));
|
JanetStream *stream = janet_abstract(&StreamAT, sizeof(JanetStream));
|
||||||
#ifndef SOCK_CLOEXEC
|
#if !defined(SOCK_CLOEXEC) && defined(O_CLOEXEC)
|
||||||
int extra = O_CLOEXEC;
|
int extra = O_CLOEXEC;
|
||||||
#else
|
#else
|
||||||
int extra = 0;
|
int extra = 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user