forkfd: fix _POSIX_SPAWN feature check
Change-Id: Ia44edbac3a1bd2da92ee8c92956abfe49d8763b8 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>bb10
parent
9588e1bba3
commit
5919edc523
|
|
@ -648,7 +648,7 @@ err_free:
|
|||
}
|
||||
#endif // FORKFD_NO_FORKFD
|
||||
|
||||
#if defined(_POSIX_SPAWN) && !defined(FORKFD_NO_SPAWNFD)
|
||||
#if _POSIX_SPAWN > 0 && !defined(FORKFD_NO_SPAWNFD)
|
||||
int spawnfd(int flags, pid_t *ppid, const char *path, const posix_spawn_file_actions_t *file_actions,
|
||||
posix_spawnattr_t *attrp, char *const argv[], char *const envp[])
|
||||
{
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@
|
|||
#include <stdint.h>
|
||||
#include <unistd.h> // to get the POSIX flags
|
||||
|
||||
#ifdef _POSIX_SPAWN
|
||||
#if _POSIX_SPAWN > 0
|
||||
# include <spawn.h>
|
||||
#endif
|
||||
|
||||
|
|
@ -51,7 +51,7 @@ int forkfd(int flags, pid_t *ppid);
|
|||
int forkfd_wait(int ffd, forkfd_info *info, struct rusage *rusage);
|
||||
int forkfd_close(int ffd);
|
||||
|
||||
#ifdef _POSIX_SPAWN
|
||||
#if _POSIX_SPAWN > 0
|
||||
/* only for spawnfd: */
|
||||
# define FFD_SPAWN_SEARCH_PATH O_RDWR
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue