From 986b80d0b2f30684f3bc96e4ae310b1c3c3b5ab5 Mon Sep 17 00:00:00 2001 From: Rosen Penev Date: Mon, 2 May 2022 17:53:07 -0700 Subject: [PATCH] fix time_t format Use musl's define to test for 64-bit time_t. Signed-off-by: Rosen Penev --- sys-utils/unshare.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys-utils/unshare.c b/sys-utils/unshare.c index 755631ff4d..88306f0f46 100644 --- a/sys-utils/unshare.c +++ b/sys-utils/unshare.c @@ -217,7 +217,7 @@ static void settime(time_t offset, clockid_t clk_id) char buf[sizeof(stringify_value(ULONG_MAX)) * 3]; int fd, len; - len = snprintf(buf, sizeof(buf), "%d %ld 0", clk_id, offset); + len = snprintf(buf, sizeof(buf), "%d %" PRId64 " 0", clk_id, (int64_t) offset); fd = open("/proc/self/timens_offsets", O_WRONLY); if (fd < 0) -- 2.47.2