Commit 822e8801 authored by Gleb Popov's avatar Gleb Popov 💬
Browse files

Fix stty.cpp on FreeBSD

parent e5108560
......@@ -162,10 +162,10 @@ int STTY::findTTY()
#ifdef __sgi__
ptyfd = open("/dev/ptmx",O_RDWR);
#elif defined(Q_OS_MAC)
#elif defined(Q_OS_MAC) || defined(Q_OS_FREEBSD)
ptyfd = posix_openpt(O_RDWR);
#endif
#if defined(__sgi__) || defined(Q_OS_MAC)
#if defined(__sgi__) || defined(Q_OS_MAC) || defined(Q_OS_FREEBSD)
if (ptyfd == -1) {
perror("Can't open a pseudo teletype");
return(-1);
......@@ -178,7 +178,7 @@ int STTY::findTTY()
#endif
// first we try UNIX PTY's
#ifdef TIOCGPTN
#if defined(TIOCGPTN) && !defined(Q_OS_FREEBSD)
strcpy(pty_master,"/dev/ptmx");
strcpy(tty_slave,"/dev/pts/");
ptyfd = open(pty_master,O_RDWR);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment