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 ? ' ' : '!');

Reply via email to