Ticket #4052: fix FTBFS on OSes w/o O_CLOEXEC.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
This commit is contained in:
Andrew Borodin 2020-01-22 10:44:19 +03:00
parent f0d8bed947
commit 28ca5cb128

View File

@ -45,6 +45,16 @@ int sigwinch_pipe[2];
/*** file scope macro definitions ****************************************************************/
/* some OSes don't provide O_CLOEXEC */
#if !defined O_CLOEXEC && defined O_NOINHERIT
/* Mingw spells it 'O_NOINHERIT'. */
#define O_CLOEXEC O_NOINHERIT
#endif
#ifndef O_CLOEXEC
#define O_CLOEXEC 0
#endif
/*** global variables ****************************************************************************/
/*** file scope type declarations ****************************************************************/