umdns: fix 64-bit time format string
authorRosen Penev <rosenp@gmail.com>
Thu, 15 Oct 2020 06:10:27 +0000 (23:10 -0700)
committerJohn Crispin <john@phrozen.org>
Tue, 26 Jan 2021 10:22:30 +0000 (11:22 +0100)
Fixes compilation under musl 1.2.0

Signed-off-by: Rosen Penev <rosenp@gmail.com>
service.c

index af3083ec60e7792fb32c5df525723c54513dac1e..66a3382a0389f52c85e06beed3a270e78c3e7163 100644 (file)
--- a/service.c
+++ b/service.c
@@ -17,6 +17,7 @@
 
 #include <resolv.h>
 #include <glob.h>
+#include <inttypes.h>
 #include <stdio.h>
 #include <time.h>
 
@@ -122,7 +123,7 @@ service_timeout(struct service *s)
        time_t t = monotonic_time();
 
        if (t - s->t <= TOUT_LOOKUP) {
-               DBG(2, "t=%lu, s->t=%lu, t - s->t = %lu\n", t, s->t, t - s->t);
+               DBG(2, "t=%" PRId64 ", s->t=%" PRId64 ", t - s->t = %" PRId64 "\n", (int64_t)t, (int64_t)s->t, (int64_t)(t - s->t));
                return 0;
        }