Merge pull request #741 from cainbit/fix_uart_setnonblock

This commit is contained in:
Jonathan Naylor 2022-03-07 07:59:57 +00:00 committed by GitHub
commit 3e8cda274d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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;