diff options
Diffstat (limited to 'io')
-rw-r--r-- | io/channel-socket.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/io/channel-socket.c b/io/channel-socket.c index 03757c7a7e..b0ea7d48b3 100644 --- a/io/channel-socket.c +++ b/io/channel-socket.c @@ -159,7 +159,7 @@ int qio_channel_socket_connect_sync(QIOChannelSocket *ioc, trace_qio_channel_socket_connect_complete(ioc, fd); if (qio_channel_socket_set_fd(ioc, fd, errp) < 0) { - closesocket(fd); + close(fd); return -1; } @@ -233,7 +233,7 @@ int qio_channel_socket_listen_sync(QIOChannelSocket *ioc, trace_qio_channel_socket_listen_complete(ioc, fd); if (qio_channel_socket_set_fd(ioc, fd, errp) < 0) { - closesocket(fd); + close(fd); return -1; } qio_channel_set_feature(QIO_CHANNEL(ioc), QIO_CHANNEL_FEATURE_LISTEN); @@ -310,7 +310,7 @@ int qio_channel_socket_dgram_sync(QIOChannelSocket *ioc, trace_qio_channel_socket_dgram_complete(ioc, fd); if (qio_channel_socket_set_fd(ioc, fd, errp) < 0) { - closesocket(fd); + close(fd); return -1; } @@ -444,7 +444,7 @@ static void qio_channel_socket_finalize(Object *obj) #ifdef WIN32 qemu_socket_unselect(ioc->fd, NULL); #endif - closesocket(ioc->fd); + close(ioc->fd); ioc->fd = -1; } } @@ -852,7 +852,7 @@ qio_channel_socket_close(QIOChannel *ioc, socket_listen_cleanup(sioc->fd, errp); } - if (closesocket(sioc->fd) < 0) { + if (close(sioc->fd) < 0) { sioc->fd = -1; error_setg_errno(&err, errno, "Unable to close socket"); error_propagate(errp, err); |