Date: Tue, 4 Jun 2024 15:21:57 +0000 From: Shawn Webb <shawn.webb@hardenedbsd.org> To: Stefan =?utf-8?B?RcOfZXI=?= <se@freebsd.org> Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: 41ee91c64f47 - main - newfs_msdos: fix build on non-FreeBSD systems Message-ID: <yby7q4ygywjeglrngvzdrcwfcdodc2lqw5a4m2lenq4ck7mcet@bror4anr4vny> In-Reply-To: <202406040628.4546SJ98088668@gitrepo.freebsd.org> References: <202406040628.4546SJ98088668@gitrepo.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
--w6kuvq3p3istedrw Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Jun 04, 2024 at 06:28:19AM +0000, Stefan E=DFer wrote: > The branch main has been updated by se: >=20 > URL: https://cgit.FreeBSD.org/src/commit/?id=3D41ee91c64f47faaa8131df3cd8= a63bdb60fa486a >=20 > commit 41ee91c64f47faaa8131df3cd8a63bdb60fa486a > Author: Stefan E=DFer <se@FreeBSD.org> > AuthorDate: 2024-06-04 06:26:09 +0000 > Commit: Stefan E=DFer <se@FreeBSD.org> > CommitDate: 2024-06-04 06:26:09 +0000 >=20 > newfs_msdos: fix build on non-FreeBSD systems > =20 > Disable data area alignment if the build environment does not define > PAGE_SIZE (e.g., when building on Linux or macOS). > =20 > Reported by: jrtc27 > MFC after: 1 week > --- > sbin/newfs_msdos/mkfs_msdos.c | 4 ++++ > 1 file changed, 4 insertions(+) >=20 > 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, con= st struct msdos_options *op) > if (o.align) > alignto =3D bpb.bpbSecPerClust; > else > +#ifdef PAGE_SIZE > alignto =3D PAGE_SIZE / bpb.bpbBytesPerSec; > +#else > + alignto =3D 1; > +#endif Imagine the following: 1. someone builds FreeBSD on Linux or macOS 2. that build is deployed 3. FreeBSD is rebuilt on that deployment Could the value of alignto be different on step 1 versus step 3? Thanks, --=20 Shawn Webb Cofounder / Security Engineer HardenedBSD Tor-ified Signal: +1 303-901-1600 / shawn_webb_opsec.50 https://git.hardenedbsd.org/hardenedbsd/pubkeys/-/raw/master/Shawn_Webb/03A= 4CBEBB82EA5A67D9F3853FF2E67A277F8E1FA.pub.asc --w6kuvq3p3istedrw Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEEA6TL67gupaZ9nzhT/y5nonf44foFAmZfMQwACgkQ/y5nonf4 4fqdVQ//a8kGQZCX9aIFfavw8Mv7/xh578+eVUGl5a9OY6Qri3QJjHyjvvfvU3Hm LFHrN/IyqNaj/K/a+R4Gqxbv+a0UhvYnHu6WYGySoYE8hZPyqkPMUwtT0HaSAbNS hC6S42iIJVV3e0hK/0JtiE+mkXl+AINhN9Aw91nVKKmKHX68kcWFjz812zGP8R5s EJnCsAi8Ja6KCV1+2EH4sL87c37ikQGdl1D594yJCEtBh0+khBXTyj171vWcBPBP fojdX7ayzUI49uUV0scbpwnFR9RT5yww7zEvarZzW858TSS448GW7BuHtoC95iwi 9YOcQK0ib64VlcxfKZY91HlF9Ef4/BvK6aV7Ce0rpHa5b5V2i1gRyI8gekRNFR4W Uv5fA6TdrLgG9CNVrur71j3jZFuu9Q1atfDdJO9BVk/2sWnFw6zmEBCRk3YkdmbG DDu7IByV4+NwLgYfGLiE2IJxY9tIcVr2hxu9jz/JXV8DCiGLQN/cVNcLAF23WYen cHAuTFSuytiadGarYwOgfOJuaIhabcgp2QkmAWeHvU4/KnCuc6hb2p3db06k2n6J 87+pgLX0jv/FV7gcUvsEvaWEG5wVBu4OkdCX/J4zSGKSqaCotyEfK1NV9lONS/mG dh5+J81nbew8w2EcJpR6yGK0tPpqOWRlwfyUGHR1CMrqJ4HoQBQ= =jkgX -----END PGP SIGNATURE----- --w6kuvq3p3istedrw--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?yby7q4ygywjeglrngvzdrcwfcdodc2lqw5a4m2lenq4ck7mcet>