[Pkg-libvirt-commits] [libguestfs] 32/59: src: launch: cast the sockaddr args to sockaddr*
Hilko Bengen
bengen at moszumanska.debian.org
Wed Nov 26 22:04:05 UTC 2014
This is an automated email from the git hooks/post-receive script.
bengen pushed a commit to branch master
in repository libguestfs.
commit ed854c72d19338324674bb808dddde45bc43f929
Author: Pino Toscano <ptoscano at redhat.com>
Date: Mon Oct 27 13:08:34 2014 +0100
src: launch: cast the sockaddr args to sockaddr*
This matches what generally done for passing socket addresses to e.g.
socket and bind, and already done in other parts of libguestfs.
(cherry picked from commit d1634799e396f2003e2abd36b042a1133bb6d928)
---
src/launch-direct.c | 3 ++-
src/launch-libvirt.c | 5 +++--
src/launch-unix.c | 2 +-
3 files changed, 6 insertions(+), 4 deletions(-)
diff --git a/src/launch-direct.c b/src/launch-direct.c
index 021df94..d81dcd7 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 26d3202..1f3c451 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 c5e4438..ac165a8 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;
}
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-libvirt/libguestfs.git
More information about the Pkg-libvirt-commits
mailing list