From patchwork Wed Oct 10 14:02:44 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [03/25] qemu-sockets: unix_listen and unix_connect are portable Date: Wed, 10 Oct 2012 04:02:44 -0000 From: Paolo Bonzini X-Patchwork-Id: 190645 Message-Id: <1349877786-23514-4-git-send-email-pbonzini@redhat.com> To: qemu-devel@nongnu.org Cc: lcapitulino@redhat.com 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 modificato, 17 inserzioni(+), 32 rimozioni(-) diff --git a/qemu-sockets.c b/qemu-sockets.c index ed062d3..f7e67b6 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) +{ + error_setg(errp, "unix sockets are not available on windows"); + errno = ENOTSUP; + return -1; +} + +int unix_connect_opts(QemuOpts *opts, Error **errp) +{ + error_setg(errp, "unix sockets are not available on windows"); + 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) -{ - error_setg(errp, "unix sockets are not available on windows"); - errno = ENOTSUP; - return -1; -} - -int unix_connect_opts(QemuOpts *opts, Error **errp) -{ - error_setg(errp, "unix sockets are not available on windows"); - errno = ENOTSUP; - return -1; -} - -int unix_listen(const char *path, char *ostr, int olen, Error **errp) -{ - error_setg(errp, "unix sockets are not available on windows"); - errno = ENOTSUP; - return -1; -} - -int unix_connect(const char *path, Error **errp) -{ - error_setg(errp, "unix sockets are not available on windows"); - errno = ENOTSUP; - return -1; -} - -#endif - #ifdef _WIN32 static void socket_cleanup(void) {