rtl_tcp: silence warning about socklen_t/int sign.

rtl_tcp.c:457:57: warning: pointer types point to integer types
	with different sign passing 'int *', expected
	'socklen_t *' [-Wpointer-sign]

Signed-off-by: Steve Markgraf <steve@steve-m.de>
master
Christian Vogel 13 years ago committed by Steve Markgraf
parent b5beddca4f
commit f3a6302866
  1. 8
      src/rtl_tcp.c

@ -42,6 +42,9 @@
#ifdef _WIN32 #ifdef _WIN32
#pragma comment(lib, "ws2_32.lib") #pragma comment(lib, "ws2_32.lib")
typedef int socklen_t;
#else #else
#define closesocket close #define closesocket close
#define SOCKADDR struct sockaddr #define SOCKADDR struct sockaddr
@ -318,6 +321,7 @@ int main(int argc, char **argv)
struct timeval tv = {1,0}; struct timeval tv = {1,0};
struct linger ling = {1,0}; struct linger ling = {1,0};
SOCKET listensocket; SOCKET listensocket;
socklen_t rlen;
fd_set readfds; fd_set readfds;
u_long blockmode = 1; u_long blockmode = 1;
#ifdef _WIN32 #ifdef _WIN32
@ -466,8 +470,8 @@ int main(int argc, char **argv)
if(do_exit) { if(do_exit) {
goto out; goto out;
} else if(r) { } else if(r) {
r=sizeof(remote); rlen = sizeof(remote);
s = accept(listensocket,(struct sockaddr *)&remote, &r); s = accept(listensocket,(struct sockaddr *)&remote, &rlen);
break; break;
} }
} }

Loading…
Cancel
Save