From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:48405) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TLwsk-0001Sk-UP for qemu-devel@nongnu.org; Wed, 10 Oct 2012 10:03:36 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TLwsf-00028y-1M for qemu-devel@nongnu.org; Wed, 10 Oct 2012 10:03:30 -0400 Received: from mail-pb0-f45.google.com ([209.85.160.45]:48668) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TLwse-00028a-RB for qemu-devel@nongnu.org; Wed, 10 Oct 2012 10:03:24 -0400 Received: by mail-pb0-f45.google.com with SMTP id rp2so726564pbb.4 for ; Wed, 10 Oct 2012 07:03:24 -0700 (PDT) Sender: Paolo Bonzini From: Paolo Bonzini Date: Wed, 10 Oct 2012 16:02:44 +0200 Message-Id: <1349877786-23514-4-git-send-email-pbonzini@redhat.com> In-Reply-To: <1349877786-23514-1-git-send-email-pbonzini@redhat.com> References: <1349877786-23514-1-git-send-email-pbonzini@redhat.com> Subject: [Qemu-devel] [PATCH 03/25] qemu-sockets: unix_listen and unix_connect are portable List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , 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) { -- 1.7.12.1