X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=src%2Ftool_sleep.c;h=a63d85ffbb04cc74212e76c61a902b4df4dc2561;hb=cfd75dcdb18d0a4291f48020211c65507a97d9eb;hp=d878512ac4daf76e337764bb2b0840520669e725;hpb=24b9957402f17c422eeeb3386bf049feeb342e78;p=platform%2Fupstream%2Fcurl.git diff --git a/src/tool_sleep.c b/src/tool_sleep.c index d878512..a63d85f 100644 --- a/src/tool_sleep.c +++ b/src/tool_sleep.c @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2014, Daniel Stenberg, , et al. + * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -25,10 +25,10 @@ # include #endif -#ifdef HAVE_SYS_POLL_H -# include -#elif defined(HAVE_POLL_H) +#ifdef HAVE_POLL_H # include +#elif defined(HAVE_SYS_POLL_H) +# include #endif #ifdef MSDOS @@ -51,7 +51,7 @@ void tool_go_sleep(long ms) struct timeval timeout; timeout.tv_sec = ms / 1000L; ms = ms % 1000L; - timeout.tv_usec = ms * 1000L; + timeout.tv_usec = (int)ms * 1000; select(0, NULL, NULL, NULL, &timeout); #endif }