mirror of
https://github.com/janet-lang/janet
synced 2024-11-28 19:19:53 +00:00
Simplifying workaround for missing O_CLOEXEC
This commit is contained in:
parent
f9f90ba1d6
commit
5565f02dbd
@ -58,7 +58,6 @@
|
|||||||
/* #define JANET_NO_REALPATH */
|
/* #define JANET_NO_REALPATH */
|
||||||
/* #define JANET_NO_SYMLINKS */
|
/* #define JANET_NO_SYMLINKS */
|
||||||
/* #define JANET_NO_UMASK */
|
/* #define JANET_NO_UMASK */
|
||||||
/* #define JANET_NO_CLOEXEC */
|
|
||||||
/* #define JANET_OUT_OF_MEMORY do { printf("janet out of memory\n"); exit(1); } while (0) */
|
/* #define JANET_OUT_OF_MEMORY do { printf("janet out of memory\n"); exit(1); } while (0) */
|
||||||
/* #define JANET_EXIT(msg) do { printf("C assert failed executing janet: %s\n", msg); exit(1); } while (0) */
|
/* #define JANET_EXIT(msg) do { printf("C assert failed executing janet: %s\n", msg); exit(1); } while (0) */
|
||||||
/* #define JANET_TOP_LEVEL_SIGNAL(msg) call_my_function((msg), stderr) */
|
/* #define JANET_TOP_LEVEL_SIGNAL(msg) call_my_function((msg), stderr) */
|
||||||
|
@ -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));
|
||||||
#if !defined(SOCK_CLOEXEC) && !defined(JANET_NO_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