diff options
Diffstat (limited to 'xs_socket.h')
-rw-r--r-- | xs_socket.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/xs_socket.h b/xs_socket.h index c5eab80..e4a18ec 100644 --- a/xs_socket.h +++ b/xs_socket.h @@ -82,10 +82,10 @@ FILE *xs_socket_accept(int rs) /* accepts an incoming connection */ { int cs = -1; - struct sockaddr_in host; - socklen_t l = sizeof(host); + struct sockaddr_storage addr; + socklen_t l = sizeof(addr); - cs = accept(rs, (struct sockaddr *)&host, &l); + cs = accept(rs, (struct sockaddr *)&addr, &l); return cs == -1 ? NULL : fdopen(cs, "r+"); } |