diff options
author | Paolo Bonzini <pbonzini@redhat.com> | 2011-10-05 09:17:32 +0200 |
---|---|---|
committer | Kevin Wolf <kwolf@redhat.com> | 2011-10-21 17:34:12 +0200 |
commit | 154b9a0cbd67be53afcb45ae84a240add8c6cb67 (patch) | |
tree | 70f98a37b189f326a79a0987d2b31b6b15f465f4 /oslib-posix.c | |
parent | d8716b41b9bd2c7ce6fe36ab388de534ce81a69a (diff) | |
download | hqemu-154b9a0cbd67be53afcb45ae84a240add8c6cb67.zip hqemu-154b9a0cbd67be53afcb45ae84a240add8c6cb67.tar.gz |
add socket_set_block
Cc: MORITA Kazutaka <morita.kazutaka@lab.ntt.co.jp>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'oslib-posix.c')
-rw-r--r-- | oslib-posix.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/oslib-posix.c b/oslib-posix.c index a304fb0..dbc8ee8 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; |