summaryrefslogtreecommitdiff
path: root/util.c
diff options
context:
space:
mode:
Diffstat (limited to 'util.c')
-rw-r--r--util.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/util.c b/util.c
index ca16d41..be304cb 100644
--- a/util.c
+++ b/util.c
@@ -75,6 +75,9 @@ struct sockaddr *addr_copy(struct sockaddr *in) {
break;
}
out->sa_family = in->sa_family;
+#ifdef SIN6_LEN
+ out->sa_len = in->sa_len;
+#endif
return out;
}