diff options
author | Brent Cook <busterb@gmail.com> | 2023-10-15 19:05:29 -0500 |
---|---|---|
committer | Brent Cook <busterb@gmail.com> | 2023-10-29 16:52:28 -0500 |
commit | 1fd73818df53ae51adb681a34b2d5bca4bb37e49 (patch) | |
tree | 577a385add2cc828cc69f834bb56c6f12f1ce74e /include | |
parent | ce79c96489b2d95de95d27f91ab6281d91f92dca (diff) | |
download | portable-1fd73818df53ae51adb681a34b2d5bca4bb37e49.tar.gz portable-1fd73818df53ae51adb681a34b2d5bca4bb37e49.tar.bz2 portable-1fd73818df53ae51adb681a34b2d5bca4bb37e49.zip |
adjust how sizeof time_t is set, the current way causes issues with MSVC 2022's preprocessor
Diffstat (limited to 'include')
-rw-r--r-- | include/compat/time.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/include/compat/time.h b/include/compat/time.h index 540807d..2748521 100644 --- a/include/compat/time.h +++ b/include/compat/time.h | |||
@@ -3,6 +3,14 @@ | |||
3 | * sys/time.h compatibility shim | 3 | * sys/time.h compatibility shim |
4 | */ | 4 | */ |
5 | 5 | ||
6 | #ifndef SIZEOF_TIME_T | ||
7 | #ifdef SMALL_TIME_T | ||
8 | #define SIZEOF_TIME_T 4 | ||
9 | #else | ||
10 | #define SIZEOF_TIME_T 8 | ||
11 | #endif | ||
12 | #endif | ||
13 | |||
6 | #ifdef _MSC_VER | 14 | #ifdef _MSC_VER |
7 | #if _MSC_VER >= 1900 | 15 | #if _MSC_VER >= 1900 |
8 | #include <../ucrt/time.h> | 16 | #include <../ucrt/time.h> |