Processing (Unix): better pipe2(2) existance check

This commit is contained in:
李通洲
2025-02-05 15:36:09 +08:00
parent 63cc8e5523
commit 7f212025de
2 changed files with 9 additions and 2 deletions
+2 -2
View File
@@ -32,9 +32,9 @@
enum { FF_PIPE_BUFSIZ = 8192 };
static inline int ffPipe2(int *fds, int flags)
static inline int ffPipe2(int* fds, int flags)
{
#ifdef __APPLE__
#ifndef FF_HAVE_PIPE2
if(pipe(fds) == -1)
return -1;
fcntl(fds[0], F_SETFL, fcntl(fds[0], F_GETFL) | flags);