Module: kamailio
Branch: master
Commit: 8841257671b6c5f3c4cfee3f1b7bb46d54faaf65
URL:
https://github.com/kamailio/kamailio/commit/8841257671b6c5f3c4cfee3f1b7bb46…
Author: Victor Seva <linuxmaniac(a)torreviejawireless.org>
Committer: Victor Seva <linuxmaniac(a)torreviejawireless.org>
Date: 2023-03-14T17:03:45+01:00
core: use PRIu64 macro to find out what format is needed for uint64_t
since it depends on architecture
---
Modified: src/core/utils/tmrec.c
---
Diff:
https://github.com/kamailio/kamailio/commit/8841257671b6c5f3c4cfee3f1b7bb46…
Patch:
https://github.com/kamailio/kamailio/commit/8841257671b6c5f3c4cfee3f1b7bb46…
---
diff --git a/src/core/utils/tmrec.c b/src/core/utils/tmrec.c
index 205866163f..14e9243914 100644
--- a/src/core/utils/tmrec.c
+++ b/src/core/utils/tmrec.c
@@ -32,6 +32,7 @@
#include <string.h>
#include <time.h>
#include <stdint.h>
+#include <inttypes.h>
#include "../../core/mem/mem.h"
#include "tmrec.h"
@@ -272,7 +273,7 @@ int ac_print(ac_tm_t *_atp)
return -1;
}
- printf("\nSys time: %lu\nTime: %02d:%02d:%02d\n", (uint64_t)_atp->time,
+ printf("\nSys time: %" PRIu64 "\nTime: %02d:%02d:%02d\n",
(uint64_t)_atp->time,
_atp->t.tm_hour, _atp->t.tm_min, _atp->t.tm_sec);
printf("Date: %s, %04d-%02d-%02d\n", _wdays[_atp->t.tm_wday],
_atp->t.tm_year+1900, _atp->t.tm_mon+1, _atp->t.tm_mday);
@@ -512,15 +513,15 @@ int tr_print(tmrec_t *_trp)
return -1;
}
printf("Recurrence definition\n-- start time ---\n");
- printf("Sys time: %lu\n", (uint64_t)_trp->dtstart);
+ printf("Sys time: %" PRIu64 "\n", (uint64_t)_trp->dtstart);
printf("Time: %02d:%02d:%02d\n", _trp->ts.tm_hour,
_trp->ts.tm_min, _trp->ts.tm_sec);
printf("Date: %s, %04d-%02d-%02d\n", _wdays[_trp->ts.tm_wday],
_trp->ts.tm_year+1900, _trp->ts.tm_mon+1, _trp->ts.tm_mday);
printf("---\n");
- printf("End time: %lu\n", (uint64_t)_trp->dtend);
- printf("Duration: %lu\n", (uint64_t)_trp->duration);
- printf("Until: %lu\n", (uint64_t)_trp->until);
+ printf("End time: %" PRIu64 "\n", (uint64_t)_trp->dtend);
+ printf("Duration: %" PRIu64 "\n", (uint64_t)_trp->duration);
+ printf("Until: %" PRIu64 "\n", (uint64_t)_trp->until);
printf("Freq: %d\n", (int)_trp->freq);
printf("Interval: %d\n", (int)_trp->interval);
if(_trp->byday)