提交 0c814709 编写于 作者: P Paolo Bonzini

qemu-sockets: unix_listen and unix_connect are portable

They are just wrappers and do not need a Win32-specific version.
Reviewed-by: NLuiz Capitulino <lcapitulino@redhat.com>
Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
上级 7fc4e63e
...@@ -730,6 +730,23 @@ int unix_connect_opts(QemuOpts *opts, Error **errp) ...@@ -730,6 +730,23 @@ int unix_connect_opts(QemuOpts *opts, Error **errp)
return sock; 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 */ /* compatibility wrapper */
int unix_listen(const char *str, char *ostr, int olen, Error **errp) int unix_listen(const char *str, char *ostr, int olen, Error **errp)
{ {
...@@ -772,38 +789,6 @@ int unix_connect(const char *path, Error **errp) ...@@ -772,38 +789,6 @@ int unix_connect(const char *path, Error **errp)
return sock; 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 #ifdef _WIN32
static void socket_cleanup(void) static void socket_cleanup(void)
{ {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册