aboutsummaryrefslogtreecommitdiff
path: root/include/qemu
diff options
context:
space:
mode:
authorMarc-André Lureau <marcandre.lureau@redhat.com>2023-03-06 16:27:44 +0400
committerMarc-André Lureau <marcandre.lureau@redhat.com>2023-03-13 15:39:31 +0400
commit0a237f4de45b8addbc35a316ee1c0bc7a4887da7 (patch)
tree48b007391e30cf0d2ad10dd4ead43003a6a3ebe1 /include/qemu
parente387ef472f661657df67574e337f0558424f836a (diff)
downloadqemu-0a237f4de45b8addbc35a316ee1c0bc7a4887da7.zip
qemu-0a237f4de45b8addbc35a316ee1c0bc7a4887da7.tar.gz
qemu-0a237f4de45b8addbc35a316ee1c0bc7a4887da7.tar.bz2
osdep: implement qemu_socketpair() for win32
Manually implement a socketpair() function, using UNIX sockets and simple peer credential checking. QEMU doesn't make much use of socketpair, beside vhost-user which is not available for win32 at this point. However, I intend to use it for writing some new portable tests. Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Daniel P. Berrangé <berrange@redhat.com> Message-Id: <20230306122751.2355515-5-marcandre.lureau@redhat.com>
Diffstat (limited to 'include/qemu')
-rw-r--r--include/qemu/sockets.h2
1 files changed, 0 insertions, 2 deletions
diff --git a/include/qemu/sockets.h b/include/qemu/sockets.h
index 2b0698a..d935fd8 100644
--- a/include/qemu/sockets.h
+++ b/include/qemu/sockets.h
@@ -15,7 +15,6 @@ int inet_aton(const char *cp, struct in_addr *ia);
bool fd_is_socket(int fd);
int qemu_socket(int domain, int type, int protocol);
-#ifndef WIN32
/**
* qemu_socketpair:
* @domain: specifies a communication domain, such as PF_UNIX
@@ -30,7 +29,6 @@ int qemu_socket(int domain, int type, int protocol);
* Return 0 on success.
*/
int qemu_socketpair(int domain, int type, int protocol, int sv[2]);
-#endif
int qemu_accept(int s, struct sockaddr *addr, socklen_t *addrlen);
/*