summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorTavian Barnes <tavianator@tavianator.com>2024-01-17 13:57:33 -0500
committerTavian Barnes <tavianator@tavianator.com>2024-01-17 13:57:33 -0500
commit6f5c265e84f565fd37ea2ad38d7f588ca08b0f03 (patch)
treedc5835b3c70d8ffe39fc75d38e54cd176e8fc43d /src
parenteaf38feeb43cb2e6558b685d51f36ae775315339 (diff)
downloadbfs-6f5c265e84f565fd37ea2ad38d7f588ca08b0f03.tar.xz
xspawn: Check for _POSIX_SPAWN in bfs_spawn_addfchdir()
Diffstat (limited to 'src')
-rw-r--r--src/xspawn.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/xspawn.c b/src/xspawn.c
index 98f1f65..8d6108b 100644
--- a/src/xspawn.c
+++ b/src/xspawn.c
@@ -186,7 +186,7 @@ int bfs_spawn_addfchdir(struct bfs_spawn *ctx, int fd) {
# define BFS_POSIX_SPAWN_FCHDIR posix_spawn_file_actions_addfchdir_np
#endif
-#ifdef BFS_POSIX_SPAWN_FCHDIR
+#if _POSIX_SPAWN > 0 && defined(BFS_POSIX_SPAWN_FCHDIR)
if (ctx->flags & BFS_SPAWN_USE_POSIX) {
errno = BFS_POSIX_SPAWN_FCHDIR(&ctx->actions, fd);
if (errno != 0) {