From nobody Tue Jun 04 06:28:19 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Vtgdc1K7xz5MYWV; Tue, 04 Jun 2024 06:28:20 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Vtgdc0Xcrz4kvV; Tue, 4 Jun 2024 06:28:20 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1717482500; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=qg5SEhzDq5UjZ5aN/ODYZrtuC6LTrmqt0N/TZtrPXTQ=; b=NlkT0YPc3S7zeuzCVX8B8UB+a7A3o1ZO6qlkx6fhMlrBFP/DpF3OqSEnzNe8UVOcCpzOuA cARCgrhNUGhzcYdTPvcdjykNkrFWhSv6oaQPMIkUDdXxZ7C/+UKNZ5SDjn3ScTUbosF084 Zcys/YF8nru/d7uUK8wAEifL6siirCZWfJzoMu2iiB4jsopo9cUQ7MF5N0nGmcCSfuXao9 vqs2ImqZGYsdY6PQab90ZojVF6kr8V8kS4X55m0or/89BUWLdDkRty/mlEz1+npSgB2ItA 8tfTneRHNqbHwnRjg2LrzK7iz5Duf1rAASUg5lvhuMjBAxqPPvOoDqatLnWMCQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1717482500; a=rsa-sha256; cv=none; b=ggmrtXExSwH11TA3HKwGnDuDBTTsRDZpCJKH9ZD+x5BIFxTdHJYF5d1ZOCl84nNGWBrkRr lEGO/0jLxVKC/Frf1oKmgYn0cKHD/so++o/jkarVrj6A7ZTe5McYw9m7rr3JojHxOiSzYk sRrlMaZl8P3Z/a0BfMQsbf/T6vOToWquWk5JC8Tj22plEiy0qZb4Q3a+uAXHetQGQO760i lnYmz8WaoStZxVYHcbSG72sWYRSihwkCTGq03DuYZeCMg3ooACpbW2TeMRhQKyl4+bJ/iX G3/F5JG25vc/YtljsHk80gzXP+CJzRhN1lQeyYKL2qed8WWUU3SLq+wagjbmyw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1717482500; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=qg5SEhzDq5UjZ5aN/ODYZrtuC6LTrmqt0N/TZtrPXTQ=; b=pYVn2yoBB2G3Y6IiGNgdfCKQYdk+FJ8261HnEYl07QnqCWwsw76ytiFA1NXORkT0bmPVHA DFzUvDwvHZ946y17mZcwHq/T21J7CiQpENsClQpeDzXGMPTI2q3Bg4KpDd9HxV3/PPsVzD aHTVsYEfHirIMgG+L/mldfOx1vpIZmiTSVbdevCFFGBfKh6q3oPwhMsgUk6vUbFRhyo/3y eEMtlOlBSbNyQwckH0n5Wc5iWzpNiBIosmTK5S/cpkAmCn8mE8ddh9uSFQ8mJi4pKbwoL3 UYiJHCMvsPLY5cC2SXyTcSp5a/ebu7Aly5w++WXabZUYFbfSZy6PE7W3oZCfgg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Vtgdc085rz16w5; Tue, 4 Jun 2024 06:28:20 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 4546SJLW088671; Tue, 4 Jun 2024 06:28:19 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 4546SJ98088668; Tue, 4 Jun 2024 06:28:19 GMT (envelope-from git) Date: Tue, 4 Jun 2024 06:28:19 GMT Message-Id: <202406040628.4546SJ98088668@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Stefan =?utf-8?Q?E=C3=9Fer?= Subject: git: 41ee91c64f47 - main - newfs_msdos: fix build on non-FreeBSD systems List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: se X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 41ee91c64f47faaa8131df3cd8a63bdb60fa486a Auto-Submitted: auto-generated The branch main has been updated by se: URL: https://cgit.FreeBSD.org/src/commit/?id=41ee91c64f47faaa8131df3cd8a63bdb60fa486a commit 41ee91c64f47faaa8131df3cd8a63bdb60fa486a Author: Stefan Eßer AuthorDate: 2024-06-04 06:26:09 +0000 Commit: Stefan Eßer CommitDate: 2024-06-04 06:26:09 +0000 newfs_msdos: fix build on non-FreeBSD systems Disable data area alignment if the build environment does not define PAGE_SIZE (e.g., when building on Linux or macOS). Reported by: jrtc27 MFC after: 1 week --- sbin/newfs_msdos/mkfs_msdos.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sbin/newfs_msdos/mkfs_msdos.c b/sbin/newfs_msdos/mkfs_msdos.c index 423fbbcadcc5..1bca560a59e1 100644 --- a/sbin/newfs_msdos/mkfs_msdos.c +++ b/sbin/newfs_msdos/mkfs_msdos.c @@ -571,7 +571,11 @@ mkfs_msdos(const char *fname, const char *dtype, const struct msdos_options *op) if (o.align) alignto = bpb.bpbSecPerClust; else +#ifdef PAGE_SIZE alignto = PAGE_SIZE / bpb.bpbBytesPerSec; +#else + alignto = 1; +#endif if (alignto > 1) { /* align data clusters */ alignment = (bpb.bpbResSectors + bpb.bpbBigFATsecs * bpb.bpbFATs + rds) %