File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -76,11 +76,17 @@ extern char **environ;
76
76
77
77
/* Detect availability of posix_spawn_file_actions_addchdir_np. Since
78
78
* this doesn't seem to follow any standard, just a common extension, we
79
- * must enumerate supported systems for availability. */
79
+ * must enumerate supported systems for availability. Define JANET_SPAWN_NO_CHDIR
80
+ * to disable this. */
81
+ #ifndef JANET_SPAWN_NO_CHDIR
80
82
#ifdef __GLIBC__
81
83
#define JANET_SPAWN_CHDIR
84
+ #elif defined(JANET_APPLE ) /* Some older versions may not work here. */
85
+ #define JANET_SPAWN_CHDIR
86
+ #elif defined(__FreeBSD__ ) /* Not all BSDs work, for example openBSD doesn't seem to support this */
87
+ #define JANET_SPAWN_CHDIR
88
+ #endif
82
89
#endif
83
-
84
90
85
91
/* Not POSIX, but all Unixes but Solaris have this function. */
86
92
#if defined(JANET_POSIX ) && !defined(__sun )
You can’t perform that action at this time.
0 commit comments