diff --git a/drivers/serial/pty.c b/drivers/serial/pty.c index e8b5a2207b..78cfafeee6 100644 --- a/drivers/serial/pty.c +++ b/drivers/serial/pty.c @@ -874,6 +874,12 @@ static int pty_ioctl(FAR struct file *filep, int cmd, unsigned long arg) } break; + case FIONBIO: + { + ret = file_ioctl(&dev->pd_sink, cmd, arg); + } + break; + /* Any unrecognized IOCTL commands will be passed to the contained * pipe driver. * @@ -892,7 +898,7 @@ static int pty_ioctl(FAR struct file *filep, int cmd, unsigned long arg) ret = file_ioctl(&dev->pd_sink, cmd, arg); } #else - ret = ENOTTY; + ret = -ENOTTY; #endif } break;