mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-02 15:23:53 -06:00
Replace fcntl(O_NONBLOCK) with g_unix_set_fd_nonblocking()
Suggested-by: Daniel P. Berrangé <berrange@redhat.com> Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
This commit is contained in:
parent
d640b59eb3
commit
22e135fca3
6 changed files with 9 additions and 21 deletions
|
@ -113,7 +113,7 @@ int tap_open(char *ifname, int ifname_size, int *vnet_hdr,
|
|||
return -1;
|
||||
}
|
||||
pstrcpy(ifname, ifname_size, ifr.ifr_name);
|
||||
fcntl(fd, F_SETFL, O_NONBLOCK);
|
||||
g_unix_set_fd_nonblocking(fd, true, NULL);
|
||||
return fd;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue