Merge pull request #4688 from gilles-peskine-arm/winsock-fd-range-2.x

Backport 2.x: Fix net_sockets regression on Windows