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) | |||
| 82 | /* accepts an incoming connection */ | 82 | /* accepts an incoming connection */ |
| 83 | { | 83 | { |
| 84 | int cs = -1; | 84 | int cs = -1; |
| 85 | struct sockaddr_in host; | 85 | struct sockaddr_storage addr; |
| 86 | socklen_t l = sizeof(host); | 86 | socklen_t l = sizeof(addr); |
| 87 | 87 | ||
| 88 | cs = accept(rs, (struct sockaddr *)&host, &l); | 88 | cs = accept(rs, (struct sockaddr *)&addr, &l); |
| 89 | 89 | ||
| 90 | return cs == -1 ? NULL : fdopen(cs, "r+"); | 90 | return cs == -1 ? NULL : fdopen(cs, "r+"); |
| 91 | } | 91 | } |