From: Stefan Weil Date: Sat, 31 Mar 2012 15:34:41 +0000 (+0200) Subject: block/curl: Replace usleep by g_usleep X-Git-Tag: TizenStudio_2.0_p2.3.2~208^2~4266^2~4 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=fb7c8e8a2d3ac99c9310a01d17a2b46584320bc9;p=sdk%2Femulator%2Fqemu.git 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 Signed-off-by: Stefan Hajnoczi --- diff --git a/block/curl.c b/block/curl.c index e9102e3..a909eca 100644 --- a/block/curl.c +++ b/block/curl.c @@ -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);