Radish alpha
H
rad:z3QDZAW2FAfuLvihrhiyDC9fAD8G9
HardenedBSD Package Manager
Radicle
Git
Dragonfly does not have the O_TTY_INIT flag
Baptiste Daroussin committed 12 years ago
commit 21d4a719910d3b5677372746b2f4e6a3f06b3c73
parent 3587198
1 file changed +5 -1
modified pkg/utils.c
@@ -50,8 +50,12 @@ query_tty_yesno(const char *msg, ...)
	va_list	 ap;
	int	 tty_fd;
	FILE	*tty;
+
	int	 tty_flags = O_RDWR;

-
	tty_fd = open(_PATH_TTY, O_RDWR|O_TTY_INIT);
+
#ifdef __FreeBSD__
+
	tty_flags |= O_TTY_INIT;
+
#endif
+
	tty_fd = open(_PATH_TTY, tty_flags);
	if (tty_fd == -1)
		return (r);		/* No ctty -- return the
					 * default answer */