aboutsummaryrefslogtreecommitdiff
path: root/include/sysemu/os-win32.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/sysemu/os-win32.h')
-rw-r--r--include/sysemu/os-win32.h15
1 files changed, 13 insertions, 2 deletions
diff --git a/include/sysemu/os-win32.h b/include/sysemu/os-win32.h
index e2849f88ab..15c296e0eb 100644
--- a/include/sysemu/os-win32.h
+++ b/include/sysemu/os-win32.h
@@ -171,10 +171,21 @@ bool qemu_socket_select(int sockfd, WSAEVENT hEventObject,
bool qemu_socket_unselect(int sockfd, Error **errp);
-/* We wrap all the sockets functions so that we can
- * set errno based on WSAGetLastError()
+/* We wrap all the sockets functions so that we can set errno based on
+ * WSAGetLastError(), and use file-descriptors instead of SOCKET.
*/
+/*
+ * qemu_close_socket_osfhandle:
+ * @fd: a file descriptor associated with a SOCKET
+ *
+ * Close only the C run-time file descriptor, leave the SOCKET opened.
+ *
+ * Returns zero on success. On error, -1 is returned, and errno is set to
+ * indicate the error.
+ */
+int qemu_close_socket_osfhandle(int fd);
+
#undef close
#define close qemu_close_wrap
int qemu_close_wrap(int fd);