socklen_t compatibility cruft.
This commit is contained in:
@@ -2,10 +2,11 @@
|
||||
#include <sys/socket.h>
|
||||
#include <netinet/in.h>
|
||||
#include "socket.h"
|
||||
#include "havesl.h"
|
||||
|
||||
int socket_accept4(int s,char *ip,uint16 *port) {
|
||||
struct sockaddr_in si;
|
||||
unsigned int len = sizeof si;
|
||||
socklen_t len = sizeof si;
|
||||
int fd;
|
||||
if ((fd=accept(s,(struct sockaddr*) &si,&len))<0) return -1;
|
||||
*(uint32*)ip = *(uint32*)&si.sin_addr;
|
||||
|
||||
Reference in New Issue
Block a user