aboutsummaryrefslogtreecommitdiff
path: root/ui/spice-core.c
diff options
context:
space:
mode:
Diffstat (limited to 'ui/spice-core.c')
-rw-r--r--ui/spice-core.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/ui/spice-core.c b/ui/spice-core.c
index 2645e96..8a6050f 100644
--- a/ui/spice-core.c
+++ b/ui/spice-core.c
@@ -126,11 +126,13 @@ static void watch_update_mask(SpiceWatch *watch, int event_mask)
static SpiceWatch *watch_add(int fd, int event_mask, SpiceWatchFunc func, void *opaque)
{
SpiceWatch *watch;
-
#ifdef WIN32
+ g_autofree char *msg = NULL;
+
fd = _open_osfhandle(fd, _O_BINARY);
if (fd < 0) {
- error_setg_win32(&error_warn, WSAGetLastError(), "Couldn't associate a FD with the SOCKET");
+ msg = g_win32_error_message(WSAGetLastError());
+ warn_report("Couldn't associate a FD with the SOCKET: %s", msg);
return NULL;
}
#endif