From 0c814709471ac8a9617406e1e2cbd7015e97bfe9 Mon Sep 17 00:00:00 2001 From: Paolo Bonzini Date: Thu, 18 Oct 2012 08:44:00 +0200 Subject: 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 Signed-off-by: Paolo Bonzini --- qemu-sockets.c | 49 +++++++++++++++++-------------------------------- 1 file changed, 17 insertions(+), 32 deletions(-) (limited to 'qemu-sockets.c') diff --git a/qemu-sockets.c b/qemu-sockets.c index 7f0d4be323..7bf756d07e 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) { -- cgit v1.2.3