From 241fd72f754388c140036eb1b826a07700f5be3b Mon Sep 17 00:00:00 2001 From: guenther Date: Sun, 11 Oct 2015 00:26:23 +0000 Subject: Userspace doesn't need to use SUN_LEN(): connect() and bind() must accept sizeof(struct sockaddr_un), so do the simple, portable thing ok beck@ deraadt@ --- client.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'client.c') diff --git a/client.c b/client.c index da7bb314..2eb48a49 100644 --- a/client.c +++ b/client.c @@ -119,7 +119,7 @@ retry: fatal("socket failed"); log_debug("trying connect"); - if (connect(fd, (struct sockaddr *) &sa, SUN_LEN(&sa)) == -1) { + if (connect(fd, (struct sockaddr *) &sa, sizeof(sa)) == -1) { log_debug("connect failed: %s", strerror(errno)); if (errno != ECONNREFUSED && errno != ENOENT) goto failed; -- cgit