summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorMarko Mäkelä <marko.makela@mariadb.com>2022-04-06 12:08:30 +0300
committerMarko Mäkelä <marko.makela@mariadb.com>2022-04-06 12:08:30 +0300
commit9d94c60f2b67b6008c69d51b0b85ac539a1ce647 (patch)
treef4a3198e4326358343abf9bfe3c667a726e23495 /include
parentd6758efbe126cdc6a0718a4b560d9e8f494c0399 (diff)
parentcacb61b6be78b01a9c62890cc81d059ee46921ac (diff)
downloadmariadb-git-9d94c60f2b67b6008c69d51b0b85ac539a1ce647.tar.gz
Merge 10.5 into 10.6
Diffstat (limited to 'include')
-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);
}