From e3cb2b2278c265072d6ba6f0adf30b5dec0fbcd8 Mon Sep 17 00:00:00 2001 From: Damien Miller Date: Wed, 16 Sep 2026 12:28:40 +1000 Subject: [PATCH] unbreak readpassphrase.c sync --- openbsd-compat/readpassphrase.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/openbsd-compat/readpassphrase.c b/openbsd-compat/readpassphrase.c index a93380a8f..43b7128c1 100644 --- a/openbsd-compat/readpassphrase.c +++ b/openbsd-compat/readpassphrase.c @@ -91,8 +91,11 @@ restart: * Read and write to /dev/tty if available. If not, read from * stdin and write to stderr unless a tty is required. */ +#ifndef O_CLOEXEC +# define O_CLOEXEC 0 +#endif if ((flags & RPP_STDIN) || - (input = output = __pledge_open(_PATH_TTY, O_RDWR | O_CLOEXEC)) == -1) { + (input = output = open(_PATH_TTY, O_RDWR | O_CLOEXEC)) == -1) { if (flags & RPP_REQUIRE_TTY) { errno = ENOTTY; return(NULL);