summaryrefslogtreecommitdiffstats
path: root/client/client.c
diff options
context:
space:
mode:
authorMartin Mares <mj@ucw.cz>2000-06-09 09:30:22 +0200
committerMartin Mares <mj@ucw.cz>2000-06-09 09:30:22 +0200
commit0b3bf4b1d898b4e438fe4959a63fc16211baff12 (patch)
treeaaca6d8a8801fcbad9cbb15260b917b3b8103bbb /client/client.c
parent0e376168c570507c8cb64b143eff0049442e201e (diff)
downloadbird-0b3bf4b1d898b4e438fe4959a63fc16211baff12.tar
bird-0b3bf4b1d898b4e438fe4959a63fc16211baff12.zip
Use SUN_LEN() for length of UNIX domain addresses. This should fix problems
with connection to clients on libc5 machines.
Diffstat (limited to 'client/client.c')
-rw-r--r--client/client.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/client/client.c b/client/client.c
index 8b01ce3..a139b04 100644
--- a/client/client.c
+++ b/client/client.c
@@ -250,7 +250,7 @@ server_connect(void)
bzero(&sa, sizeof(sa));
sa.sun_family = AF_UNIX;
strcpy(sa.sun_path, server_path);
- if (connect(server_fd, (struct sockaddr *) &sa, sizeof(struct sockaddr)) < 0)
+ if (connect(server_fd, (struct sockaddr *) &sa, SUN_LEN(&sa)) < 0)
die("Unable to connect to server control socket (%s): %m", server_path);
if (fcntl(server_fd, F_SETFL, O_NONBLOCK) < 0)
die("fcntl: %m");