fixed a conditional check for O_CLOEXEC in mux.c

This commit is contained in:
hyung-hwan 2022-02-17 01:51:32 +00:00
parent 3b2901b8f1
commit a866592695

View File

@ -1119,7 +1119,7 @@ int qse_mux_setupchan (qse_mux_t* mux)
return -1;
}
#if defined(HAVE_PIPE2)
#if defined(HAVE_PIPE2) && defined(O_CLOEXEC)
if (pipe2(mux->chan, O_CLOEXEC | O_NONBLOCK) <= -1)
#else
if (pipe(mux->chan) <= -1)
@ -1130,7 +1130,7 @@ int qse_mux_setupchan (qse_mux_t* mux)
}
else
{
#if defined(HAVE_PIPE2)
#if defined(HAVE_PIPE2) && defined(O_CLOEXEC)
/* do nothing */
#else
int flags;