diff mbox series

[PATCHv2] umdns: fix 64-bit time format string

Message ID 20200830001954.47455-1-rosenp@gmail.com
State Superseded
Headers show
Series [PATCHv2] umdns: fix 64-bit time format string | expand

Commit Message

Rosen Penev Aug. 30, 2020, 12:19 a.m. UTC
Fixes compilation under musl 1.2.0

Signed-off-by: Rosen Penev <rosenp@gmail.com>
---
 v2: added header to fix compilation with uClibc-ng
 service.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/service.c b/service.c
index af3083e..53f44c1 100644
--- 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=%llu, s->t=%llu, t - s->t = %llu\n", (unsigned long long)t, (unsigned long long)s->t, (unsigned long long)(t - s->t));
 		return 0;
 	}