Skip to content

Commit

Permalink
fix UART setNonblock bug.
Browse files Browse the repository at this point in the history
  • Loading branch information
cainbit committed Feb 18, 2022
1 parent efff4f0 commit ace0d21
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion UARTController.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -400,7 +400,7 @@ bool CUARTController::setRaw()
#if defined(__APPLE__)
int CUARTController::setNonblock(bool nonblock)
{
int flag = ::fcntl(m_fd, F_GETFD, 0);
int flag = ::fcntl(m_fd, F_GETFL, 0);

if (nonblock)
flag |= O_NONBLOCK;
Expand Down

0 comments on commit ace0d21

Please sign in to comment.