diff --git a/components/lwp/terminal/freebsd/tty_compat.c b/components/lwp/terminal/freebsd/tty_compat.c index cbb9069c07..08ff49f801 100644 --- a/components/lwp/terminal/freebsd/tty_compat.c +++ b/components/lwp/terminal/freebsd/tty_compat.c @@ -539,15 +539,15 @@ int lwp_tty_ioctl_adapter(lwp_tty_t tp, int cmd, int oflags, void *args, rt_thre args->cmd = TIOCMSET; error = (sys_ioctl(td, (struct ioctl_args *)args)); break; - +#endif /* USING_BSD_IOCTL_EXT */ /* TIOCGSOFTCAR */ /* TIOCSSOFTCAR */ case FIONREAD: /* TIOCINQ */ - args->cmd = FIONREAD; - error = (sys_ioctl(td, (struct ioctl_args *)args)); + error = (IOCTL(FIONREAD, args, fflags, td)); break; +#ifdef USING_BSD_IOCTL_EXT /* TIOCLINUX */ case TIOCCONS: