The makefs msdosfs code includes fs/msdosfs/denode.h which directly uses
struct buf from <sys/buf.h> rather than the makefs struct m_buf.
To work around this problem provide a local denode.h that includes
ffs/buf.h and defines buf as an alias for m_buf.
Details
Diff Detail
- Repository
- rG FreeBSD src repository
- Lint
Lint Not Applicable - Unit
Tests Not Applicable
Event Timeline
Could you please explain suggested modification to the msdosfs headers?
I am fine with the workaround from this review, but I highly dislike direct abuse of kernel headers done in makefs(8). I did buildworld on HEAD, and run kyua test in usr.sbin/makefs. I have no idea how to detect more breakage.
BTW, I run tinderbox and make buildworld on stable/12, and it succeeded.
The breakage only occurs if you build makefs as part of the bootstrap tools. I.e. you'll need LOCAL_XTOOL_DIRS="lib/libnetbsd usr.sbin/makefs" -DBOOTSTRAP_ALL_TOOLS and/or D27619 to reproduce the build failure (happening for me on 12.2).
I'll look into the changes to the msdosfs headers tomorrow to see if that's less ugly.
sys/fs/msdosfs/denode.h | ||
---|---|---|
55 | May be, instead of _KERNEL check, add #include <sys/buf.h> to consumers in sys/fs/msdosfs that lack it? Then remove this include at all. |
sys/fs/msdosfs/denode.h | ||
---|---|---|
55 | Sounds good, let me try that. |