Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
blobfish
kdevelop
Commits
822e8801
Commit
822e8801
authored
Jul 08, 2016
by
Gleb Popov
💬
Browse files
Fix stty.cpp on FreeBSD
parent
e5108560
Changes
1
Hide whitespace changes
Inline
Side-by-side
debuggers/common/stty.cpp
View file @
822e8801
...
...
@@ -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
def
ined(
TIOCGPTN
) && !defined(Q_OS_FREEBSD)
strcpy
(
pty_master
,
"/dev/ptmx"
);
strcpy
(
tty_slave
,
"/dev/pts/"
);
ptyfd
=
open
(
pty_master
,
O_RDWR
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment