From 054be3e724282cd8540ec6f39e94777df4e47a73 Mon Sep 17 00:00:00 2001 From: nirenjan Date: Wed, 1 Apr 2026 14:51:04 -0700 Subject: [PATCH] handle sockaddr len on macos --- daemon/x52d_comm_internal.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/daemon/x52d_comm_internal.c b/daemon/x52d_comm_internal.c index 3d67c33..6c06de4 100644 --- a/daemon/x52d_comm_internal.c +++ b/daemon/x52d_comm_internal.c @@ -54,7 +54,7 @@ static int _setup_sockaddr(struct sockaddr_un *remote, const char *sock_path) remote->sun_family = AF_UNIX; /* We've already verified that sock_path will fit, so we don't need strncpy */ strcpy(remote->sun_path, sock_path); - len += sizeof(remote->sun_family); + len += sizeof(*remote) - sizeof(remote->sun_path); return len; }