aboutsummaryrefslogtreecommitdiff
path: root/qemu-sockets.c
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2012-10-18 08:44:00 +0200
committerPaolo Bonzini <pbonzini@redhat.com>2012-10-23 13:54:55 +0200
commit0c814709471ac8a9617406e1e2cbd7015e97bfe9 (patch)
treed4096ece87e63a685263bbdd711bc888219a7170 /qemu-sockets.c
parent7fc4e63ec018a0ef6d420ddb7f6cbf68387d4995 (diff)
downloadqemu-0c814709471ac8a9617406e1e2cbd7015e97bfe9.zip
qemu-0c814709471ac8a9617406e1e2cbd7015e97bfe9.tar.gz
qemu-0c814709471ac8a9617406e1e2cbd7015e97bfe9.tar.bz2
qemu-sockets: unix_listen and unix_connect are portable
They are just wrappers and do not need a Win32-specific version. Reviewed-by: Luiz Capitulino <lcapitulino@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'qemu-sockets.c')
-rw-r--r--qemu-sockets.c49
1 files changed, 17 insertions, 32 deletions
diff --git a/qemu-sockets.c b/qemu-sockets.c
index 7f0d4be..7bf756d 100644
--- a/qemu-sockets.c
+++ b/qemu-sockets.c
@@ -730,6 +730,23 @@ int unix_connect_opts(QemuOpts *opts, Error **errp)
return sock;
}
+#else
+
+int unix_listen_opts(QemuOpts *opts, Error **errp)
+{
+ fprintf(stderr, "unix sockets are not available on windows\n");
+ errno = ENOTSUP;
+ return -1;
+}
+
+int unix_connect_opts(QemuOpts *opts, Error **errp)
+{
+ fprintf(stderr, "unix sockets are not available on windows\n");
+ errno = ENOTSUP;
+ return -1;
+}
+#endif
+
/* compatibility wrapper */
int unix_listen(const char *str, char *ostr, int olen, Error **errp)
{
@@ -772,38 +789,6 @@ int unix_connect(const char *path, Error **errp)
return sock;
}
-#else
-
-int unix_listen_opts(QemuOpts *opts, Error **errp)
-{
- fprintf(stderr, "unix sockets are not available on windows\n");
- errno = ENOTSUP;
- return -1;
-}
-
-int unix_connect_opts(QemuOpts *opts, Error **errp)
-{
- fprintf(stderr, "unix sockets are not available on windows\n");
- errno = ENOTSUP;
- return -1;
-}
-
-int unix_listen(const char *path, char *ostr, int olen, Error **errp)
-{
- fprintf(stderr, "unix sockets are not available on windows\n");
- errno = ENOTSUP;
- return -1;
-}
-
-int unix_connect(const char *path, Error **errp)
-{
- fprintf(stderr, "unix sockets are not available on windows\n");
- errno = ENOTSUP;
- return -1;
-}
-
-#endif
-
#ifdef _WIN32
static void socket_cleanup(void)
{