summaryrefslogtreecommitdiffstats
path: root/sysdep/unix
diff options
context:
space:
mode:
Diffstat (limited to 'sysdep/unix')
-rw-r--r--sysdep/unix/io.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sysdep/unix/io.c b/sysdep/unix/io.c
index 445bc7c..7f37c08 100644
--- a/sysdep/unix/io.c
+++ b/sysdep/unix/io.c
@@ -774,7 +774,7 @@ sk_open_unix(sock *s, char *name)
unlink(name);
sa.sun_family = AF_UNIX;
strcpy(sa.sun_path, name);
- if (bind(fd, (struct sockaddr *) &sa, sizeof(sa)) < 0)
+ if (bind(fd, (struct sockaddr *) &sa, SUN_LEN(&sa)) < 0)
ERR("bind");
if (listen(fd, 8))
ERR("listen");