HomeFreeBSD

LinuxKPI: add __struct_size

Description

LinuxKPI: add __struct_size

Use builtin_object_size() by default.
If
builtin_dynamic_object_size() is available use that instead.

I would hope that in a future version we can remove the conditional
checks but in order to be able to MFC this without checking all
compiler versions simply keep it this way for now.

Sponsored by: The FreeBSD Foundation (initially)
MFC after: 3 days
Reviewed by: dumbbell
Differential Revision: https://reviews.freebsd.org/D52077

Details

Provenance
bzAuthored on Aug 18 2025, 7:53 PM
Reviewer
dumbbell
Differential Revision
D52077: LinuxKPI: add __struct_size
Parents
rG3f48a0fe53ca: LinuxKPI: add DEFINE_LOCK_GUARD_0 for rcu
Branches
Unknown
Tags
Unknown