The fileno()
is a macro on OpenBSD (and that's perfectly valid from POSIX point of view), so the ::fileno(foo)
fails to compile. I've removed ::
prefix from both fileno()
and isatty()
calls, since adding it everywhere is a bad idea due to cases like this happening.