.events = POLLIN,
};
- ret = 0;
do {
int timeout = 1000;
dprint(FD_NET, "server: connect from %s\n", from);
- sk_out = smalloc(sizeof(*sk_out));
+ sk_out = scalloc(1, sizeof(*sk_out));
if (!sk_out) {
close(sk);
return -1;
#endif
if (use_ipv6) {
- const void *src = &saddr_in6.sin6_addr;
+ void *src = &saddr_in6.sin6_addr;
addr = (struct sockaddr *) &saddr_in6;
socklen = sizeof(saddr_in6);
saddr_in6.sin6_family = AF_INET6;
str = inet_ntop(AF_INET6, src, buf, sizeof(buf));
} else {
- const void *src = &saddr_in.sin_addr;
+ void *src = &saddr_in.sin_addr;
addr = (struct sockaddr *) &saddr_in;
socklen = sizeof(saddr_in);
if (!bind_sock) {
char *p, port[16];
- const void *src;
+ void *src;
int af;
if (use_ipv6) {