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
F102541955: D29050.id85086.diff
Wed, Nov 13, 7:56 PM
Unknown Object (File)
Tue, Nov 12, 4:42 PM
Unknown Object (File)
Tue, Nov 12, 2:58 PM
Unknown Object (File)
Tue, Nov 12, 12:42 AM
Unknown Object (File)
Mon, Nov 11, 10:08 PM
Unknown Object (File)
Mon, Nov 11, 3:30 PM
Unknown Object (File)
Mon, Nov 11, 6:17 AM
Unknown Object (File)
Mon, Nov 11, 2:16 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