[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [xen staging] libs/light: fix tv_sec fprintf format
commit 96607a8e680e7f965ca868d11f8b0636317d2618 Author: Fabrice Fontaine <fontaine.fabrice@xxxxxxxxx> AuthorDate: Sat Aug 28 11:07:09 2021 +0200 Commit: Ian Jackson <iwj@xxxxxxxxxxxxxx> CommitDate: Tue Aug 31 18:13:47 2021 +0100 libs/light: fix tv_sec fprintf format Don't assume tv_sec is a unsigned long, it is 64 bits on NetBSD 32 bits. Use %jd and cast to (intmax_t) instead Signed-off-by: Fabrice Fontaine <fontaine.fabrice@xxxxxxxxx> Acked-by: Ian Jackson <iwj@xxxxxxxxxxxxxx> --- tools/libs/light/libxl_domain.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/libs/light/libxl_domain.c b/tools/libs/light/libxl_domain.c index c00c36c928..51a6127552 100644 --- a/tools/libs/light/libxl_domain.c +++ b/tools/libs/light/libxl_domain.c @@ -1444,7 +1444,7 @@ static int libxl__mark_domid_recent(libxl__gc *gc, uint32_t domid) } } - r = fprintf(nf, "%lu %u\n", ctxt.ts.tv_sec, domid); + r = fprintf(nf, "%jd %u\n", (intmax_t)ctxt.ts.tv_sec, domid); if (r < 0) { LOGED(ERROR, domid, "failed to write to '%s'", new); goto out; -- generated by git-patchbot for /home/xen/git/xen.git#staging
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |