NetBSD/OpenBSD: Compile fix and proper detection of pipe2
Add the necessary defines for HAVE_PIPE2 for NetBSD and OpenBSD depending on OS version when pipe2(2) was added. This also fixes the compile error on NetBSD if -Werror=unused-function for ignore_sigpipe() as the HAVE_PIPE2 tree is prior to O_NOSIGPIPE in create_pipe(). Change-Id: Ic8f875e34ef826a7bf046c77588afecaa097deca Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This commit is contained in:
parent
9c01fdb2ba
commit
4fc7971478
7
src/3rdparty/forkfd/forkfd.c
vendored
7
src/3rdparty/forkfd/forkfd.c
vendored
@ -30,6 +30,9 @@
|
||||
#include "forkfd.h"
|
||||
|
||||
#include <sys/types.h>
|
||||
#if defined(__OpenBSD__) || defined(__NetBSD__)
|
||||
# include <sys/param.h>
|
||||
#endif
|
||||
#include <sys/time.h>
|
||||
#include <sys/resource.h>
|
||||
#include <sys/wait.h>
|
||||
@ -65,7 +68,9 @@
|
||||
# undef HAVE_WAITID
|
||||
#endif
|
||||
|
||||
#if defined(__FreeBSD__) && defined(__FreeBSD_version) && __FreeBSD_version >= 1000032
|
||||
#if (defined(__FreeBSD__) && defined(__FreeBSD_version) && __FreeBSD_version >= 1000032) || \
|
||||
(defined(__OpenBSD__) && OpenBSD >= 201505) || \
|
||||
(defined(__NetBSD__) && __NetBSD_Version__ >= 600000000)
|
||||
# define HAVE_PIPE2 1
|
||||
#endif
|
||||
#if defined(__FreeBSD__) || defined(__DragonFly__) || defined(__FreeBSD_kernel__) || \
|
||||
|
Loading…
x
Reference in New Issue
Block a user