summaryrefslogtreecommitdiffstats
path: root/src/3rdparty
diff options
context:
space:
mode:
Diffstat (limited to 'src/3rdparty')
-rw-r--r--src/3rdparty/forkfd/forkfd.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/3rdparty/forkfd/forkfd.c b/src/3rdparty/forkfd/forkfd.c
index 1b3e162a7e..3f9e82cd45 100644
--- a/src/3rdparty/forkfd/forkfd.c
+++ b/src/3rdparty/forkfd/forkfd.c
@@ -436,6 +436,7 @@ static int create_pipe(int filedes[], int flags)
return ret;
}
+#ifndef FORKFD_NO_FORKFD
/**
* @brief forkfd returns a file descriptor representing a child process
* @return a file descriptor, or -1 in case of failure
@@ -590,8 +591,9 @@ err_free:
freeInfo(header, info);
return -1;
}
+#endif // FORKFD_NO_FORKFD
-#ifdef _POSIX_SPAWN
+#if defined(_POSIX_SPAWN) && !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[])
{
@@ -652,4 +654,4 @@ err_free:
out:
return -1;
}
-#endif // _POSIX_SPAWN
+#endif // _POSIX_SPAWN && !FORKFD_NO_SPAWNFD