You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fix Windows EINVAL on connect: override FD_SETSIZE for libmodbus
libmodbus checks 'if (socket >= FD_SETSIZE)' and returns EINVAL.
On Linux FD_SETSIZE=1024 and fd numbers are small, so this works.
On Windows FD_SETSIZE=64 and SOCKET handles are opaque kernel values
that are typically >> 64, causing every connection attempt to fail
with 'Invalid argument'.
Fix: pass CPPFLAGS=-DFD_SETSIZE=4096 when building libmodbus on
Windows so the check no longer rejects valid socket handles.