diff options
Diffstat (limited to 'include/compat/time.h')
-rw-r--r-- | include/compat/time.h | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/include/compat/time.h b/include/compat/time.h new file mode 100644 index 0000000..d363d42 --- /dev/null +++ b/include/compat/time.h | |||
@@ -0,0 +1,16 @@ | |||
1 | /* | ||
2 | * Public domain | ||
3 | * sys/time.h compatibility shim | ||
4 | */ | ||
5 | |||
6 | #ifndef LIBCRYPTOCOMPAT_TIME_H | ||
7 | #define LIBCRYPTOCOMPAT_TIME_H | ||
8 | |||
9 | #ifdef _MSC_VER | ||
10 | #include <../include/time.h> | ||
11 | #define gmtime_r(tp, tm) ((gmtime_s((tm), (tp)) == 0) ? (tm) : NULL) | ||
12 | #else | ||
13 | #include_next <time.h> | ||
14 | #endif | ||
15 | |||
16 | #endif | ||