userdb: fix type to pass to connect()

Fixes https://github.com/systemd/systemd/pull/20613#issuecomment-944621275.
This commit is contained in:
Yu Watanabe
2021-10-16 05:04:26 +09:00
committed by Lennart Poettering
parent eaaa02bffe
commit c14e57356f

View File

@@ -512,7 +512,7 @@ static int display_services(int argc, char *argv[], void *userdata) {
if (fd < 0)
return log_error_errno(r, "Failed to allocate AF_UNIX/SOCK_STREAM socket: %m");
if (connect(fd, &sockaddr.un, sockaddr_len) < 0) {
if (connect(fd, &sockaddr.sa, sockaddr_len) < 0) {
no = strjoin("No (", errno_to_name(errno), ")");
if (!no)
return log_oom();