summaryrefslogtreecommitdiff
path: root/util
diff options
context:
space:
mode:
authorAnthony Liguori <aliguori@us.ibm.com>2013-03-22 13:05:57 -0500
committerAnthony Liguori <aliguori@us.ibm.com>2013-03-22 13:05:57 -0500
commitcecd77ae6df060bbe8f0eea6691112097e680a52 (patch)
tree4c82bcf59884c6555cb0199a1f96a26a2dfaf83a /util
parentf9308207040dc4a1484cee459bedaec03645b935 (diff)
parent01ed1d527c59356e6c4c9d54b5710a3c9e78ce4e (diff)
Merge remote-tracking branch 'stefanha/trivial-patches' into staging
# By liguang (2) and others # Via Stefan Hajnoczi * stefanha/trivial-patches: qdev: remove redundant abort() gitignore: ignore more files Use proper term in TCG README serial: Fix debug format strings Fix typos and misspellings Advertise --libdir in configure --help output memory: fix a bug of detection of memory region collision MinGW: Replace setsockopt by qemu_setsocketopt
Diffstat (limited to 'util')
-rw-r--r--util/qemu-sockets.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/util/qemu-sockets.c b/util/qemu-sockets.c
index 83e4e08e85..d70bbf03da 100644
--- a/util/qemu-sockets.c
+++ b/util/qemu-sockets.c
@@ -156,12 +156,12 @@ int inet_listen_opts(QemuOpts *opts, int port_offset, Error **errp)
continue;
}
- setsockopt(slisten,SOL_SOCKET,SO_REUSEADDR,(void*)&on,sizeof(on));
+ qemu_setsockopt(slisten, SOL_SOCKET, SO_REUSEADDR, &on, sizeof(on));
#ifdef IPV6_V6ONLY
if (e->ai_family == PF_INET6) {
/* listen on both ipv4 and ipv6 */
- setsockopt(slisten,IPPROTO_IPV6,IPV6_V6ONLY,(void*)&off,
- sizeof(off));
+ qemu_setsockopt(slisten, IPPROTO_IPV6, IPV6_V6ONLY, &off,
+ sizeof(off));
}
#endif
@@ -229,7 +229,7 @@ static void wait_for_connect(void *opaque)
qemu_set_fd_handler2(s->fd, NULL, NULL, NULL, NULL);
do {
- rc = getsockopt(s->fd, SOL_SOCKET, SO_ERROR, (void *) &val, &valsize);
+ rc = qemu_getsockopt(s->fd, SOL_SOCKET, SO_ERROR, &val, &valsize);
} while (rc == -1 && socket_error() == EINTR);
/* update rc to contain error */
@@ -456,7 +456,7 @@ int inet_dgram_opts(QemuOpts *opts, Error **errp)
error_set_errno(errp, errno, QERR_SOCKET_CREATE_FAILED);
goto err;
}
- setsockopt(sock,SOL_SOCKET,SO_REUSEADDR,(void*)&on,sizeof(on));
+ qemu_setsockopt(sock, SOL_SOCKET, SO_REUSEADDR, &on, sizeof(on));
/* bind socket */
if (bind(sock, local->ai_addr, local->ai_addrlen) < 0) {