1From 4881285bcfd8f2e2c913c6e9f011b1e90652f414 Mon Sep 17 00:00:00 2001 2From: Fabrice Fontaine <fontaine.fabrice@gmail.com> 3Date: Sat, 28 Aug 2021 11:00:07 +0200 4Subject: [PATCH] libs/light: fix tv_sec fprintf format 5 6Don't assume tv_sec is a unsigned long, it is 64 bits on NetBSD 32 bits. 7Use %jd and cast to (intmax_t) instead 8 9Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com> 10[Upstream status: sent to xen-devel@lists.xenproject.org] 11--- 12 tools/libs/light/libxl_domain.c | 2 +- 13 1 file changed, 1 insertion(+), 1 deletion(-) 14 15diff --git a/tools/libxl/libxl_domain.c b/tools/libxl/libxl_domain.c 16index c00c36c928..51a6127552 100644 17--- a/tools/libxl/libxl_domain.c 18+++ b/tools/libxl/libxl_domain.c 19@@ -1444,7 +1444,7 @@ static int libxl__mark_domid_recent(libxl__gc *gc, uint32_t domid) 20 } 21 } 22 23- r = fprintf(nf, "%lu %u\n", ctxt.ts.tv_sec, domid); 24+ r = fprintf(nf, "%jd %u\n", (intmax_t)ctxt.ts.tv_sec, domid); 25 if (r < 0) { 26 LOGED(ERROR, domid, "failed to write to '%s'", new); 27 goto out; 28-- 292.32.0 30 31