Cygwin and SDL_net

I’m working on a cross-platform game that uses SDL_net. Everything works
in Linux, but when I compile it in Windows XP using Cygwin, the network
part starts misbehaving. Single player works fine, but I get a “Couldn’t
create socket” error when using SDLNet_TCP_Open. Any suggestions of what
might be wrong? I’m using the pre-compiled SDL_net 1.2.5 win32 binary.

Here’s an excerpt from the area where it errors:

Uint16 PORT = 7756;
IPaddress server_ip;
TCPsocket server_sock;
SDLNet_SocketSet set;

if(!set) {
printf(“SDLNet_AllocSocketSet: %s\n”, SDLNet_GetError());

// fetch an IP for the server
if(SDLNet_ResolveHost(&server_ip,NULL,PORT) == -1) {
printf(“SDLNet_ResolveHost: %s\n”,SDLNet_GetError());

// open a socket - *** This is where it errors ***
server_sock = SDLNet_TCP_Open(&server_ip);
if(!server_sock) {
printf(“SDLNet_TCP_Open: %s\n”,SDLNet_GetError());

The game can also be downloaded here: