summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--listen.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/listen.c b/listen.c
index 2a54888..c5ba16f 100644
--- a/listen.c
+++ b/listen.c
@@ -189,7 +189,7 @@ int uh_socket_bind(const char *host, const char *port, bool tls)
l->fd.fd = sock;
l->tls = tls;
- l->addr = *(struct sockaddr_in6 *)p->ai_addr;
+ memcpy(&l->addr, p->ai_addr, p->ai_addrlen);
list_add_tail(&l->list, &listeners);
bound++;