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
Unknown Object (File)
Thu, Sep 19, 6:38 PM
Unknown Object (File)
Wed, Sep 18, 11:40 AM
Unknown Object (File)
Tue, Sep 17, 12:20 PM
Unknown Object (File)
Sun, Sep 8, 3:32 PM
Unknown Object (File)
Wed, Sep 4, 8:12 AM
Unknown Object (File)
Sun, Sep 1, 12:44 PM
Unknown Object (File)
Tue, Aug 27, 1:42 PM
Unknown Object (File)
Aug 20 2024, 12:13 PM

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