summaryrefslogtreecommitdiff
path: root/include/my_time.h
diff options
context:
space:
mode:
authorMarko Mäkelä <marko.makela@mariadb.com>2022-04-06 08:06:35 +0300
committerMarko Mäkelä <marko.makela@mariadb.com>2022-04-06 08:06:35 +0300
commit7c584d8270cf192496f36e993e7759616f3b650b (patch)
tree26e4111ca76af60136ac25c47496909f7e6e3545 /include/my_time.h
parent2d2c3da8ec846d8018c112d8901e2ae029f1c795 (diff)
parent75b9014fedd8bb85d15501a2281fbade6b56fe78 (diff)
downloadmariadb-git-7c584d8270cf192496f36e993e7759616f3b650b.tar.gz
Merge 10.2 into 10.3
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 7c8f3ce909b..304efe8e16f 100644
--- a/include/my_time.h
+++ b/include/my_time.h
@@ -217,9 +217,12 @@ static inline void my_time_trunc(MYSQL_TIME *ltime, uint decimals)
{
ltime->second_part-= my_time_fraction_remainder(ltime->second_part, decimals);
}
+#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);
}