From 1083ca28cc0b42cfa97d9f25ac41857296aca3fb Mon Sep 17 00:00:00 2001 From: kre Date: Thu, 26 Mar 2020 04:25:28 +0000 Subject: [PATCH] Fix the build, use %jd and (intmax_t) cast for big numbers, off_t and ptrdiff_t aren't always the same size. --- usr.sbin/makefs/ffs/mkfs.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/usr.sbin/makefs/ffs/mkfs.c b/usr.sbin/makefs/ffs/mkfs.c index cca4fb86d5e8..61cf74b4d4b9 100644 --- a/usr.sbin/makefs/ffs/mkfs.c +++ b/usr.sbin/makefs/ffs/mkfs.c @@ -1,4 +1,4 @@ -/* $NetBSD: mkfs.c,v 1.38 2020/03/25 20:17:48 christos Exp $ */ +/* $NetBSD: mkfs.c,v 1.39 2020/03/26 04:25:28 kre Exp $ */ /* * Copyright (c) 2002 Networks Associates Technology, Inc. @@ -48,7 +48,7 @@ static char sccsid[] = "@(#)mkfs.c 8.11 (Berkeley) 5/3/95"; #else #ifdef __RCSID -__RCSID("$NetBSD: mkfs.c,v 1.38 2020/03/25 20:17:48 christos Exp $"); +__RCSID("$NetBSD: mkfs.c,v 1.39 2020/03/26 04:25:28 kre Exp $"); #endif #endif #endif /* not lint */ @@ -821,8 +821,8 @@ ffs_wtfs(daddr_t bno, int size, void *bf, const fsinfo_t *fsopts) offset = bno * fsopts->sectorsize + fsopts->offset; if (lseek(fsopts->fd, offset, SEEK_SET) == -1) - err(EXIT_FAILURE, "%s: seek error @%td for sector %jd", - __func__, offset, (intmax_t)bno); + err(EXIT_FAILURE, "%s: seek error @%jd for sector %jd", + __func__, (intmax_t)offset, (intmax_t)bno); n = write(fsopts->fd, bf, size); if (n == -1) err(EXIT_FAILURE, "%s: write error for sector %jd", __func__,