]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
[build] fix compilation under musl 1.2
authorRosen Penev <rosenp@gmail.com>
Wed, 16 Dec 2020 14:17:24 +0000 (06:17 -0800)
committerGitHub <noreply@github.com>
Wed, 16 Dec 2020 14:17:24 +0000 (18:17 +0400)
musl 1.2 defaults to 64-bit time_t, causing a compile failure under 32-bit platforms.

src/include/switch_platform.h

index 233caa7c8be530522b21b9814d231513cf8581bb..01f129dd37bb9d917d8f2a190003aef51c53da8d 100644 (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