From e2b0943e170fd0477ffb90e3e9e3bdc56631de79 Mon Sep 17 00:00:00 2001 From: martin Date: Tue, 17 Dec 2019 08:02:00 +0000 Subject: [PATCH] Cast an off_t to intmax_t and use %jd to printf it. --- external/bsd/file/dist/src/readelf.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/external/bsd/file/dist/src/readelf.c b/external/bsd/file/dist/src/readelf.c index afc5bcfd29fe..46b550646a7f 100644 --- a/external/bsd/file/dist/src/readelf.c +++ b/external/bsd/file/dist/src/readelf.c @@ -1,4 +1,4 @@ -/* $NetBSD: readelf.c,v 1.22 2019/12/17 02:31:05 christos Exp $ */ +/* $NetBSD: readelf.c,v 1.23 2019/12/17 08:02:00 martin Exp $ */ /* * Copyright (c) Christos Zoulas 2003. @@ -32,7 +32,7 @@ #if 0 FILE_RCSID("@(#)$File: readelf.c,v 1.168 2019/12/16 03:49:19 christos Exp $") #else -__RCSID("$NetBSD: readelf.c,v 1.22 2019/12/17 02:31:05 christos Exp $"); +__RCSID("$NetBSD: readelf.c,v 1.23 2019/12/17 08:02:00 martin Exp $"); #endif #endif @@ -1355,8 +1355,8 @@ doshn(struct magic_set *ms, int clazz, int swap, int fd, off_t off, int num, name_off = xsh_offset; if (fsize != SIZE_UNKNOWN && fsize < name_off) { - if (file_printf(ms, ", too large section header offset %td", - name_off) == -1) + if (file_printf(ms, ", too large section header offset %jd", + (intmax_t)name_off) == -1) return -1; return 0; }