diff --git a/src/launch-direct.c b/src/launch-direct.c index 021df942c..d81dcd736 100644 --- a/src/launch-direct.c +++ b/src/launch-direct.c @@ -341,7 +341,8 @@ launch_direct (guestfs_h *g, void *datav, const char *arg) strncpy (addr.sun_path, guestfsd_sock, UNIX_PATH_MAX); addr.sun_path[UNIX_PATH_MAX-1] = '\0'; - if (bind (daemon_accept_sock, &addr, sizeof addr) == -1) { + if (bind (daemon_accept_sock, (struct sockaddr *) &addr, + sizeof addr) == -1) { perrorf (g, "bind"); goto cleanup0; } diff --git a/src/launch-libvirt.c b/src/launch-libvirt.c index 26d3202c7..1f3c4518a 100644 --- a/src/launch-libvirt.c +++ b/src/launch-libvirt.c @@ -404,7 +404,8 @@ launch_libvirt (guestfs_h *g, void *datav, const char *libvirt_uri) addr.sun_family = AF_UNIX; memcpy (addr.sun_path, params.guestfsd_path, UNIX_PATH_MAX); - if (bind (daemon_accept_sock, &addr, sizeof addr) == -1) { + if (bind (daemon_accept_sock, (struct sockaddr *) &addr, + sizeof addr) == -1) { perrorf (g, "bind"); goto cleanup; } @@ -428,7 +429,7 @@ launch_libvirt (guestfs_h *g, void *datav, const char *libvirt_uri) addr.sun_family = AF_UNIX; memcpy (addr.sun_path, params.console_path, UNIX_PATH_MAX); - if (bind (console_sock, &addr, sizeof addr) == -1) { + if (bind (console_sock, (struct sockaddr *) &addr, sizeof addr) == -1) { perrorf (g, "bind"); goto cleanup; } diff --git a/src/launch-unix.c b/src/launch-unix.c index c5e44381c..ac165a825 100644 --- a/src/launch-unix.c +++ b/src/launch-unix.c @@ -63,7 +63,7 @@ launch_unix (guestfs_h *g, void *datav, const char *sockpath) g->state = LAUNCHING; - if (connect (daemon_sock, &addr, sizeof addr) == -1) { + if (connect (daemon_sock, (struct sockaddr *) &addr, sizeof addr) == -1) { perrorf (g, "bind"); goto cleanup; }