[build] fix compilation under musl 1.2

musl 1.2 defaults to 64-bit time_t, causing a compile failure under 32-bit platforms.
This commit is contained in:
Rosen Penev 2020-12-16 06:17:24 -08:00 committed by GitHub
parent 2ec89f19d9
commit aa71d87528
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 0 deletions

View File

@ -270,9 +270,13 @@ typedef intptr_t switch_ssize_t;
#if defined(__FreeBSD__) && SIZEOF_VOIDP == 4
#define TIME_T_FMT "d"
#else
#if __USE_TIME_BITS64
#define TIME_T_FMT SWITCH_INT64_T_FMT
#else
#define TIME_T_FMT "ld"
#endif
#endif
#endif
#if UINTPTR_MAX == 0xffffffffffffffff