From 93d2d0912e95866c39283842f40ca08f4a0bbba1 Mon Sep 17 00:00:00 2001 From: Mikael Magnusson Date: Mon, 11 May 2020 23:33:31 +0200 Subject: WIP test sizeof sockaddr_un --- sysdep/unix/io.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sysdep/unix/io.c b/sysdep/unix/io.c index 8e6ea5f8..2f327925 100644 --- a/sysdep/unix/io.c +++ b/sysdep/unix/io.c @@ -1535,7 +1535,7 @@ sk_connect_unix(sock *s, char *name, socklen_t namelen) sa.sun_family = AF_UNIX; memcpy(sa.sun_path, name, namelen); - if (connect(fd, (struct sockaddr *) &sa, sizeof(sa_family_t) + namelen) < 0) + if (connect(fd, (struct sockaddr *) &sa, sizeof(sa) < 0)) return -1; s->fd = fd; -- cgit v1.2.3