remove a few gcc 4 warnings

work around freebsd 5.4 brokenness (if you don't have IPv6 in the
    kernel, socket(PF_INET6,SOCK_STREAM,0) returns EPROTONOSUPPORT
    instead of EPFNOSUPPORT, which basically says "yeah, I know IPv6,
    but TCP?  never heard of it")
This commit is contained in:
leitner
2005-05-05 15:55:41 +00:00
parent e62f4901c8
commit 6196f771cd
12 changed files with 31 additions and 19 deletions

View File

@@ -11,7 +11,7 @@ int socket_accept4(int s,char *ip,uint16 *port) {
struct sockaddr_in si;
socklen_t len = sizeof si;
int fd;
if ((fd=accept(s,(struct sockaddr*) &si,&len))==-1)
if ((fd=accept(s,(void*) &si,&len))==-1)
return winsock2errno(-1);
*(uint32*)ip = *(uint32*)&si.sin_addr;
uint16_unpack_big((char *) &si.sin_port,port);