101-fix_apr_time_now.patch 398 B

12345678910111213
  1. https://dev.openwrt.org/ticket/9287
  2. --- a/time/unix/time.c
  3. +++ b/time/unix/time.c
  4. @@ -75,7 +75,7 @@ APR_DECLARE(apr_time_t) apr_time_now(voi
  5. {
  6. struct timeval tv;
  7. gettimeofday(&tv, NULL);
  8. - return tv.tv_sec * APR_USEC_PER_SEC + tv.tv_usec;
  9. + return tv.tv_sec * (apr_time_t)APR_USEC_PER_SEC + (apr_time_t)tv.tv_usec;
  10. }
  11. static void explode_time(apr_time_exp_t *xt, apr_time_t t,