unbreak readpassphrase.c sync

This commit is contained in:
Damien Miller committed 2026-09-16 12:28:40 +10:00
1 parent 58db2ec9ca
commit e3cb2b2278
1 file changed
+4 -1
+4 -1
View File
@@ -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);