summary refs log tree commit diff stats
path: root/include
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
parente387ef472f661657df67574e337f0558424f836a (diff)
downloadfocaccia-qemu-0a237f4de45b8addbc35a316ee1c0bc7a4887da7.tar.gz
focaccia-qemu-0a237f4de45b8addbc35a316ee1c0bc7a4887da7.zip
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')
-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 2b0698a7c9..d935fd80da 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);
 /*