mirror of
https://github.com/clearlinux/kvmtool.git
synced 2026-06-15 18:05:49 +00:00
Fix call to connect()
According to the manpage and the prototype the second argument to connect(2) is a "const struct sockaddr*", so cast our protocol specific type back to the super type. This fixes compilation on musl-libc. Signed-off-by: Andre Przywara <andre.przywara@arm.com> Signed-off-by: Will Deacon <will.deacon@arm.com>
This commit is contained in:
committed by
Will Deacon
parent
369c27e683
commit
d77bd4f466
@@ -99,7 +99,7 @@ int kvm__get_sock_by_instance(const char *name)
|
||||
strlcpy(local.sun_path, sock_file, sizeof(local.sun_path));
|
||||
len = strlen(local.sun_path) + sizeof(local.sun_family);
|
||||
|
||||
r = connect(s, &local, len);
|
||||
r = connect(s, (struct sockaddr *)&local, len);
|
||||
if (r < 0 && errno == ECONNREFUSED) {
|
||||
/* Tell the user clean ghost socket file */
|
||||
pr_err("\"%s\" could be a ghost socket file, please remove it",
|
||||
|
||||
Reference in New Issue
Block a user