From: Todd C. Miller Date: Mon, 18 Feb 2019 22:45:31 +0000 (-0700) Subject: AIX 7.1 defines O_CLOEXEC but it can't be used outside the kernel. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=da98428e91ae95386a4a79da553675fb2b623615;p=sudo AIX 7.1 defines O_CLOEXEC but it can't be used outside the kernel. Redefine O_CLOEXEC if it doesn't fit in an int and pipe2() is missing. --- diff --git a/include/sudo_compat.h b/include/sudo_compat.h index 5c3284014..0555b0f42 100644 --- a/include/sudo_compat.h +++ b/include/sudo_compat.h @@ -217,7 +217,8 @@ #endif /* For pipe2() emulation. */ -#if !defined(HAVE_PIPE2) && defined(O_NONBLOCK) && !defined(O_CLOEXEC) +#if !defined(HAVE_PIPE2) && defined(O_NONBLOCK) && (!defined(O_CLOEXEC) || O_CLOEXEC > 0xffffffff) +# undef O_CLOEXEC # define O_CLOEXEC 0x80000000 #endif