summaryrefslogtreecommitdiffstats
path: root/libs/p11-kit/patches/010-format.patch
blob: 587f289c24ff31a14b2432f399bd5919038c1915 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
From c203931e32040f2ffb41461f3e3a5ebf3829ef63 Mon Sep 17 00:00:00 2001
From: Rosen Penev <rosenp@gmail.com>
Date: Fri, 28 Jun 2024 13:07:07 -0700
Subject: [PATCH] fix format warning with 32-bit platforms on musl

musl uses 64-bit time_t, even on 32-bit platforms. Cast to avoid the warning.
---
 p11-kit/server.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

--- a/p11-kit/server.c
+++ b/p11-kit/server.c
@@ -45,6 +45,7 @@
 #include <assert.h>
 #include <errno.h>
 #include <fcntl.h>
+#include <inttypes.h>
 #include <limits.h>
 #include <stdio.h>
 #include <stdlib.h>
@@ -558,7 +559,7 @@ server_loop (Server *server,
 
 		/* timeout */
 		if (ret == 0 && children_avail == 0 && timeout != NULL) {
-			p11_message (_("no connections to %s for %lu secs, exiting"), server->socket_name, timeout->tv_sec);
+			p11_message (_("no connections to %s for %" PRIu64 " secs, exiting"), server->socket_name, (uint64_t)timeout->tv_sec);
 			break;
 		}