diff options
Diffstat (limited to 'src/xspawn.h')
-rw-r--r-- | src/xspawn.h | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/xspawn.h b/src/xspawn.h index e3ad1eb..77273ee 100644 --- a/src/xspawn.h +++ b/src/xspawn.h @@ -9,9 +9,13 @@ #define BFS_XSPAWN_H #include "config.h" -#include <spawn.h> #include <sys/resource.h> #include <sys/types.h> +#include <unistd.h> + +#if _POSIX_SPAWN > 0 +# include <spawn.h> +#endif /** * bfs_spawn() flags. @@ -34,9 +38,11 @@ struct bfs_spawn { struct bfs_spawn_action *head; struct bfs_spawn_action **tail; +#if _POSIX_SPAWN > 0 /** posix_spawn() context, for when we can use it. */ posix_spawn_file_actions_t actions; posix_spawnattr_t attr; +#endif }; /** |