summaryrefslogtreecommitdiff
path: root/src/coredump
diff options
context:
space:
mode:
Diffstat (limited to 'src/coredump')
-rw-r--r--src/coredump/coredump.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/coredump/coredump.c b/src/coredump/coredump.c
index 41fc1993d5..01fdcfa909 100644
--- a/src/coredump/coredump.c
+++ b/src/coredump/coredump.c
@@ -847,7 +847,7 @@ static int send_iovec(const struct iovec iovec[], size_t n_iovec, int input_fd)
if (fd < 0)
return log_error_errno(errno, "Failed to create coredump socket: %m");
- if (connect(fd, &sa.sa, offsetof(union sockaddr_union, un.sun_path) + strlen(sa.un.sun_path)) < 0)
+ if (connect(fd, &sa.sa, SOCKADDR_UN_LEN(sa.un)) < 0)
return log_error_errno(errno, "Failed to connect to coredump service: %m");
for (i = 0; i < n_iovec; i++) {