diff options
author | Haibo Huang <hhb@google.com> | 2019-05-31 16:12:39 -0700 |
---|---|---|
committer | Haibo Huang <hhb@google.com> | 2019-06-18 14:58:09 -0700 |
commit | b22796788b72b1daca42bf5773b582d26860ef0a (patch) | |
tree | 1d148d55162d1d29b1bc55ea05ff62c1793086d6 /evutil_time.c | |
parent | eb295e03887a843c88bcef99c80c16dd8c13099a (diff) | |
download | libevent-b22796788b72b1daca42bf5773b582d26860ef0a.tar.gz |
Upgrade libevent to release-2.1.10-stableandroid-o-mr1-iot-release-1.0.14
Test: None
Change-Id: I24e4275a07a6dcdd932056c7893a6aabdd786b8a
Diffstat (limited to 'evutil_time.c')
-rw-r--r-- | evutil_time.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/evutil_time.c b/evutil_time.c index 00fd5fb..c3a2358 100644 --- a/evutil_time.c +++ b/evutil_time.c @@ -43,7 +43,7 @@ #ifndef EVENT__HAVE_GETTIMEOFDAY #include <sys/timeb.h> #endif -#if !defined(EVENT__HAVE_NANOSLEEP) && !defined(EVENT_HAVE_USLEEP) && \ +#if !defined(EVENT__HAVE_NANOSLEEP) && !defined(EVENT__HAVE_USLEEP) && \ !defined(_WIN32) #include <sys/select.h> #endif @@ -141,7 +141,10 @@ evutil_usleep_(const struct timeval *tv) sleep(tv->tv_sec); usleep(tv->tv_usec); #else - select(0, NULL, NULL, NULL, tv); + { + struct timeval tv2 = *tv; + select(0, NULL, NULL, NULL, &tv2); + } #endif } |