path: root/src
diff options
authorRaphael Kubo da Costa <>2015-12-26 02:30:58 +0100
committerRaphael Kubo da Costa <>2015-12-27 17:02:23 +0000
commitc8c4ad0c62cacec749b6c42e0a58339446093bba (patch)
tree4a2424a9cbcec17a13bc8fec5e5bb2e9b059240d /src
parent6b6955c2ffdb23c461812ffcda12a2296ef58513 (diff)
forkfd: Define __BSD_VISIBLE and _NETBSD_SOURCE.
pipe2's availability on BSD operating systems depends on the __BSD_VISIBLE macro on FreeBSD and OpenBSD and _NETBSD_SOURCE on NetBSD (DragonFly BSD appears to define it unconditionally). Those two macros are generally set by default, except when _POSIX_C_SOURCE is set. Since we consciously set _POSIX_C_SOURCE but need pipe2, explicitly define the visibility macros. This fixes the -no-pch build on FreeBSD at least. Change-Id: Icc77f6b5d1f9a5bf7bd8048cabbb01f8f89397cc Reviewed-by: Thiago Macieira <>
Diffstat (limited to 'src')
1 files changed, 2 insertions, 0 deletions
diff --git a/src/3rdparty/forkfd/forkfd.c b/src/3rdparty/forkfd/forkfd.c
index e35b66ae2c..099a0ff574 100644
--- a/src/3rdparty/forkfd/forkfd.c
+++ b/src/3rdparty/forkfd/forkfd.c
@@ -25,8 +25,10 @@
#ifndef _GNU_SOURCE
# define _GNU_SOURCE
+# define _NETBSD_SOURCE 1
# define _POSIX_C_SOURCE 200809L
# define _XOPEN_SOURCE 700
+# define __BSD_VISIBLE 1
#include "forkfd.h"