diff options
author | Martin Mares <mj@ucw.cz> | 2000-06-09 07:30:22 +0000 |
---|---|---|
committer | Martin Mares <mj@ucw.cz> | 2000-06-09 07:30:22 +0000 |
commit | 0b3bf4b1d898b4e438fe4959a63fc16211baff12 (patch) | |
tree | aaca6d8a8801fcbad9cbb15260b917b3b8103bbb /sysdep/unix/io.c | |
parent | 0e376168c570507c8cb64b143eff0049442e201e (diff) |
Use SUN_LEN() for length of UNIX domain addresses. This should fix problems
with connection to clients on libc5 machines.
Diffstat (limited to 'sysdep/unix/io.c')
-rw-r--r-- | sysdep/unix/io.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sysdep/unix/io.c b/sysdep/unix/io.c index 445bc7ce..7f37c08c 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"); |