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 <thiago.macieira@intel.com>bb10
parent
6b6955c2ff
commit
c8c4ad0c62
|
|
@ -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
|
||||
#endif
|
||||
#include "forkfd.h"
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue