summaryrefslogtreecommitdiff
path: root/include/my_time.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/my_time.h')
-rw-r--r--include/my_time.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/include/my_time.h b/include/my_time.h
index b7b54db5586..9f3e61b944f 100644
--- a/include/my_time.h
+++ b/include/my_time.h
@@ -244,9 +244,12 @@ static inline void my_time_trunc(MYSQL_TIME *ltime, uint decimals)
!ltime->hour && !ltime->minute && !ltime->second)
ltime->neg= FALSE;
}
+#ifdef _WIN32
+#define suseconds_t long
+#endif
static inline void my_timeval_trunc(struct timeval *tv, uint decimals)
{
- tv->tv_usec-= my_time_fraction_remainder(tv->tv_usec, decimals);
+ tv->tv_usec-= (suseconds_t) my_time_fraction_remainder(tv->tv_usec, decimals);
}