aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CMakeLists.txt1
-rw-r--r--include/compat/time.h8
2 files changed, 8 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 8c2e4ba..61ff186 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -404,7 +404,6 @@ if(SIZEOF_TIME_T STREQUAL "4")
404 message(WARNING " ** Warning, this system is unable to represent times past 2038\n" 404 message(WARNING " ** Warning, this system is unable to represent times past 2038\n"
405 " ** It will behave incorrectly when handling valid RFC5280 dates") 405 " ** It will behave incorrectly when handling valid RFC5280 dates")
406endif() 406endif()
407add_definitions(-DSIZEOF_TIME_T=${SIZEOF_TIME_T})
408 407
409set(OPENSSL_LIBS ssl crypto ${PLATFORM_LIBS}) 408set(OPENSSL_LIBS ssl crypto ${PLATFORM_LIBS})
410set(LIBTLS_LIBS tls ${PLATFORM_LIBS}) 409set(LIBTLS_LIBS tls ${PLATFORM_LIBS})
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>