summaryrefslogtreecommitdiffstats
path: root/src/3rdparty
diff options
context:
space:
mode:
authorLouai Al-Khanji <louai.al-khanji@theqtcompany.com>2015-09-03 15:52:55 +0300
committerLouai Al-Khanji <louai.al-khanji@theqtcompany.com>2015-09-04 08:59:35 +0000
commit5919edc5231f58d2d7c04ea875064a368f0df254 (patch)
treed193976fea44ed3a2385191f2e503198206143a7 /src/3rdparty
parent9588e1bba348acf9aa0d023ebb5195aa1bf69909 (diff)
forkfd: fix _POSIX_SPAWN feature check
Change-Id: Ia44edbac3a1bd2da92ee8c92956abfe49d8763b8 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/3rdparty')
-rw-r--r--src/3rdparty/forkfd/forkfd.c2
-rw-r--r--src/3rdparty/forkfd/forkfd.h4
2 files changed, 3 insertions, 3 deletions
diff --git a/src/3rdparty/forkfd/forkfd.c b/src/3rdparty/forkfd/forkfd.c
index a61198a954..55dc92fe45 100644
--- a/src/3rdparty/forkfd/forkfd.c
+++ b/src/3rdparty/forkfd/forkfd.c
@@ -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[])
{
diff --git a/src/3rdparty/forkfd/forkfd.h b/src/3rdparty/forkfd/forkfd.h
index dcb36f9f33..38858c00fe 100644
--- a/src/3rdparty/forkfd/forkfd.h
+++ b/src/3rdparty/forkfd/forkfd.h
@@ -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