Skip to content
Snippets Groups Projects
Commit 335f4033 authored by deuce's avatar deuce
Browse files

Windoes Sockets 2 uses an int pointer as the value to SO_RCVTIMEO, not

a struct timeval.
parent eb0cb802
Branches
Tags
No related merge requests found
......@@ -51,7 +51,11 @@ int rlogin_connect(char *addr, int port, char *ruser, char *passwd)
char nil=0;
char *p;
unsigned int neta;
#ifdef _WIN32
int tv;
#else
struct timeval tv;
#endif
for(p=addr;*p;p++)
if(*p!='.' && !isdigit(*p))
......@@ -92,8 +96,12 @@ int rlogin_connect(char *addr, int port, char *ruser, char *passwd)
return(-1);
}
#ifdef _WIN32
tv=100000;
#else
tv.tv_sec=0;
tv.tv_usec=100000;
#endif
setsockopt(rlogin_socket, SOL_SOCKET, SO_RCVTIMEO, &tv, sizeof(tv));
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment