aboutsummaryrefslogtreecommitdiff
path: root/oslib-posix.c
diff options
context:
space:
mode:
Diffstat (limited to 'oslib-posix.c')
-rw-r--r--oslib-posix.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/oslib-posix.c b/oslib-posix.c
index a304fb0f53..dbc8ee8960 100644
--- a/oslib-posix.c
+++ b/oslib-posix.c
@@ -103,6 +103,13 @@ void qemu_vfree(void *ptr)
free(ptr);
}
+void socket_set_block(int fd)
+{
+ int f;
+ f = fcntl(fd, F_GETFL);
+ fcntl(fd, F_SETFL, f & ~O_NONBLOCK);
+}
+
void socket_set_nonblock(int fd)
{
int f;