Page MenuHomeFreeBSD

Unbreak devel/libgtop for base post R365734
ClosedPublic

Authored by nyan_myuji.xyz on Mar 3 2021, 11:15 PM.
Tags
None
Referenced Files
F102411321: D29050.id85086.diff
Mon, Nov 11, 10:08 PM
F102391944: D29050.id85086.diff
Mon, Nov 11, 3:30 PM
F102363689: D29050.id85098.diff
Mon, Nov 11, 6:17 AM
F102351515: D29050.id85098.diff
Mon, Nov 11, 2:16 AM
Unknown Object (File)
Sat, Nov 9, 3:34 PM
Unknown Object (File)
Sat, Nov 9, 9:39 AM
Unknown Object (File)
Sat, Nov 9, 8:15 AM
Unknown Object (File)
Sat, Nov 9, 7:50 AM

Details

Summary

In R365734, the typedef bool is defined only if _KERNEL is defined.
In sysdeps/freebsd/procmap.c of this port, sys/param.h is first
included without _KERNEL defined, and later defined _KERNEL and then
includes ufs/ufs/inode.h, which includes sys/buf.h, however, in
sys/buf.h, bool inmem(..) is defined when _KERNEL is defined, this
causes the port failed to build as type bool cannot be found.

The current workaround will be simply defer the including of
ufs/ufs/inode.h and manually expand the VTOI macro

Test Plan

Poudriere testport:
12.2-RELEASE passed
14.0-CURRENT 1400005 dfff1de7 passed

Diff Detail

Repository
rP FreeBSD ports repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

cy requested changes to this revision.Mar 3 2021, 11:45 PM
cy added a subscriber: cy.
cy added inline comments.
devel/libgtop/files/patch-sysdeps_freebsd_procmap.c
18 ↗(On Diff #85093)

Why not simply moved the #include rather than the conditional complexity?

This revision now requires changes to proceed.Mar 3 2021, 11:45 PM
nyan_myuji.xyz added inline comments.
devel/libgtop/files/patch-sysdeps_freebsd_procmap.c
18 ↗(On Diff #85093)

This is because the VTIO macro was guarded by _KERNEL in earlier version of base but the macro were actually exposed in head.

Will make a version with the macro expanded by hand to make it less complex

This revision now requires review to proceed.Mar 4 2021, 12:15 AM
  • Manually expand the VTOI macro to further avoid dependency of
This revision is now accepted and ready to land.Mar 4 2021, 3:54 PM