From 452dc8b8864a8a60e60120f89430cb08ac0617e2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Raimbault?= Date: Tue, 22 Oct 2024 14:42:19 +0200 Subject: [PATCH] Use O_NONBLOCK instead of deprecated O_NDELAY (closes #710) Usually exact same value because `#define O_NDELAY O_NONBLOCK` --- src/modbus-rtu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/modbus-rtu.c b/src/modbus-rtu.c index 9a0609d5..fc8a8009 100644 --- a/src/modbus-rtu.c +++ b/src/modbus-rtu.c @@ -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