From d6263780639978db69833446e6696ef73129b670 Mon Sep 17 00:00:00 2001 From: Dirk Engling Date: Sat, 24 Oct 2026 04:55:05 +0200 Subject: set O_NONBLOCK using fcntl instead of libowfat's ndelay_off --- ot_livesync.c | 5 +++-- proxy.c | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/ot_livesync.c b/ot_livesync.c index b876ef8..c4dc6e5 100644 --- a/ot_livesync.c +++ b/ot_livesync.c @@ -5,6 +5,7 @@ /* System */ #include +#include #include #include #include @@ -13,7 +14,6 @@ /* Libowfat */ #include "ip6.h" -#include "ndelay.h" #include "socket.h" /* Opentracker */ @@ -101,7 +101,8 @@ void livesync_bind_mcast(ot_ip6 ip, uint16_t port) { if ((g_socket_in = socket_udp4()) < 0) exerr("Error: Cant create live sync incoming socket."); - ndelay_off(g_socket_in); + + fcntl(g_socket_in, F_SETFL, fcntl(g_socket_in, F_GETFL, 0) & ~O_NONBLOCK); if (socket_bind4_reuse(g_socket_in, tmpip, port) == -1) exerr("Error: Cant bind live sync incoming socket."); diff --git a/proxy.c b/proxy.c index d728e5b..ec51630 100644 --- a/proxy.c +++ b/proxy.c @@ -7,6 +7,7 @@ #include #include #include +#include #include #include #include @@ -19,7 +20,6 @@ #include "io.h" #include "iob.h" #include "ip6.h" -#include "ndelay.h" #include "scan.h" #include "socket.h" @@ -101,7 +101,8 @@ void livesync_bind_mcast(ot_ip6 ip, uint16_t port) { if ((g_socket_in = socket_udp4()) < 0) exerr("Error: Cant create live sync incoming socket."); - ndelay_off(g_socket_in); + + fcntl(g_socket_in, F_SETFL, fcntl(g_socket_in, F_GETFL, 0) & ~O_NONBLOCK); if (socket_bind4_reuse(g_socket_in, tmpip, port) == -1) exerr("Error: Cant bind live sync incoming socket."); -- cgit v1.3