Skip to content

Commit

Permalink
Use O_NONBLOCK instead of deprecated O_NDELAY (closes #710)
Browse files Browse the repository at this point in the history
Usually exact same value because
`#define O_NDELAY O_NONBLOCK`
  • Loading branch information
stephane committed Oct 22, 2024
1 parent 22ece0f commit 452dc8b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/modbus-rtu.c
Original file line number Diff line number Diff line change
Expand Up @@ -639,7 +639,7 @@ static int _modbus_rtu_connect(modbus_t *ctx)
Timeouts are ignored in canonical input mode or when the
NDELAY option is set on the file via open or fcntl */
flags = O_RDWR | O_NOCTTY | O_NDELAY | O_EXCL;
flags = O_RDWR | O_NOCTTY | O_NONBLOCK | O_EXCL;
#ifdef O_CLOEXEC
flags |= O_CLOEXEC;
#endif
Expand Down

0 comments on commit 452dc8b

Please sign in to comment.