From: Rosen Penev Date: Tue, 3 May 2022 00:53:07 +0000 (-0700) Subject: fix time_t format X-Git-Tag: v2.39-rc1~665 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=986b80d0b2f30684f3bc96e4ae310b1c3c3b5ab5;p=thirdparty%2Futil-linux.git fix time_t format Use musl's define to test for 64-bit time_t. Signed-off-by: Rosen Penev --- 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)