[sr-dev] git:master:c5e88081: core: cast pthread_self() in log - some distros makes the type opaque

Daniel-Constantin Mierla miconda at gmail.com
Mon Sep 6 09:24:45 CEST 2021


Module: kamailio
Branch: master
Commit: c5e880814e3a5270583dd8032c7378cde6905813
URL: https://github.com/kamailio/kamailio/commit/c5e880814e3a5270583dd8032c7378cde6905813

Author: Daniel-Constantin Mierla <miconda at gmail.com>
Committer: Daniel-Constantin Mierla <miconda at gmail.com>
Date: 2021-09-06T09:23:40+02:00

core: cast pthread_self() in log - some distros makes the type opaque

---

Modified: src/core/dprint.c

---

Diff:  https://github.com/kamailio/kamailio/commit/c5e880814e3a5270583dd8032c7378cde6905813.diff
Patch: https://github.com/kamailio/kamailio/commit/c5e880814e3a5270583dd8032c7378cde6905813.patch

---

diff --git a/src/core/dprint.c b/src/core/dprint.c
index 1294037b7a..9278a701f2 100644
--- a/src/core/dprint.c
+++ b/src/core/dprint.c
@@ -720,7 +720,7 @@ void ksr_slog_json(ksr_logdata_t *kld, const char *format, ...)
 			fprintf(stderr, KSR_SLOG_JSON_CEEFMT,
 			iso8601buf, _tp.tv_nsec, my_pid(),
 #ifdef HAVE_PTHREAD
-                        pthread_self(),
+                        (uintmax_t)pthread_self(),
 #endif
                         kld->v_lname,
 			kld->v_mname, kld->v_fname, kld->v_fline, kld->v_func, s_out.s,




More information about the sr-dev mailing list