From 6f5c265e84f565fd37ea2ad38d7f588ca08b0f03 Mon Sep 17 00:00:00 2001 From: Tavian Barnes Date: Wed, 17 Jan 2024 13:57:33 -0500 Subject: xspawn: Check for _POSIX_SPAWN in bfs_spawn_addfchdir() --- src/xspawn.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/xspawn.c') 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) { -- cgit v1.2.3