Skip to content

Commit 88d39bd

Browse files
Teemperoramadio
authored andcommitted
[OpenBSD] Don't assume fileno is a function.
This otherwise leads to compilation errors when we do `::fileno` as OpenBSD implemented fileno as a macro (which seems to be allowed).
1 parent 421ab05 commit 88d39bd

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

core/textinput/src/textinput/TerminalDisplayUnix.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -105,10 +105,10 @@ namespace textinput {
105105
TerminalDisplay(TerminalConfigUnix::Get().IsInteractive()),
106106
fIsAttached(false), fNColors(16), fOutputID(STDOUT_FILENO)
107107
{
108-
if (::isatty(::fileno(stdin)) && !::isatty(fOutputID)) {
109-
// Display prompt, even if stdout is going somewhere else
110-
fOutputID = ::open("/dev/tty", O_WRONLY);
111-
SetIsTTY(true);
108+
if (::isatty(fileno(stdin)) && !::isatty(fOutputID)) {
109+
// Display prompt, even if stdout is going somewhere else
110+
fOutputID = ::open("/dev/tty", O_WRONLY);
111+
SetIsTTY(true);
112112
}
113113

114114
HandleResizeSignal(); // needs fOutputID

0 commit comments

Comments
 (0)