Bug#934916: libss7: FTBFS on x32 (time_t sprintf format mismatch)

John Scott jscott at posteo.net
Sat Aug 7 20:18:44 BST 2021


Another (untested) way to fix this issue is to craft the format string
using _Generic:

 strcpy(p, mtp3_timer2str(x));
 p += strlen(p);
-sprintf(p, "(%lis)%c", ss7->ss7_sched[ss7->links[i]->mtp3_timer[x]].when.tv_sec - time(NULL),
+#define FORMAT _Generic((time_t){0}, long int: "(%lis)%c", long long int: "(%llis)%c")
+sprintf(p, FORMAT, ss7->ss7_sched[ss7->links[i]->mtp3_timer[x]].when.tv_sec - time(NULL),
 	ss7->ss7_sched[ss7->links[i]->mtp3_timer[x]].callback ? ' ' : '!');



More information about the Pkg-voip-maintainers mailing list