From: Rosen Penev Date: Wed, 16 Dec 2020 14:17:24 +0000 (-0800) Subject: [build] fix compilation under musl 1.2 X-Git-Tag: v1.10.6^2~125 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=aa71d87528643fd1b3897a64ecec8c11e92b5b55;p=thirdparty%2Ffreeswitch.git [build] fix compilation under musl 1.2 musl 1.2 defaults to 64-bit time_t, causing a compile failure under 32-bit platforms. --- diff --git a/src/include/switch_platform.h b/src/include/switch_platform.h index 233caa7c8b..01f129dd37 100644 --- a/src/include/switch_platform.h +++ b/src/include/switch_platform.h @@ -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