On 13/02/20(Thu) 16:53, Visa Hankala wrote: > On Thu, Feb 13, 2020 at 12:00:35PM +0100, Martin Pieuchot wrote: > > These structures are only used by autoconf(9) and don't need to be > > modified. Some subsystems already define most of them as 'const'. > > Diff below turn all the remaining one as such. > > > > Only a single driver, de(4), needed a modification apart from adding > > the const: removing a forward definition fixed it ;) > > > > Built for all archs, I tested i386, amd64 and sparc64. > > > > Ok? > > No, RAMDISK build fails. > > /usr/src/sys/dev/rd.c:87:15: error: assigning to 'struct cfattach *' from > 'const struct cfattach *' discards qualifiers > [-Werror,-Wincompatible-pointer-types-discards-qualifiers] > cf.cf_attach = &rd_ca; > ^ ~~~~~~
Removing const from rd(4) fixed it here in my tree. Thanks! > I wonder if this constification should also be reflected in the output > of config(8). What do you mean?