mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-05 16:53:55 -06:00
block/curl: Replace usleep by g_usleep
The function usleep is not available for all supported platforms: at least some versions of MinGW don't support it. usleep was also declared obsolete by POSIX.1-2001. The function g_usleep is part of glib2.0, so it is available for all supported platforms. Using nanosleep would also be possible but needs more code. Signed-off-by: Stefan Weil <sw@weilnetz.de> Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
This commit is contained in:
parent
3f97fd851c
commit
fb7c8e8a2d
1 changed files with 1 additions and 1 deletions
|
@ -282,7 +282,7 @@ static CURLState *curl_init_state(BDRVCURLState *s)
|
|||
break;
|
||||
}
|
||||
if (!state) {
|
||||
usleep(100);
|
||||
g_usleep(100);
|
||||
curl_multi_do(s);
|
||||
}
|
||||
} while(!state);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue