The FreeBSD linux/compiler.h in OpenZFS was copied from a very old
version of FreeBSD's linuxkpi's linux/compiler.h. This worked wellThere's no need for
enough until we started needing to tweakthis duplication. Use FreeBSD's linuxkpi version andn instead, and provide
also OpenZFS's. To ensure more compatibility,zfs_fallthrough to augment it (it's all that's needed). move to using FreeBSD'sUse #pragma once
linuxkpi compiler.h always,to avoid naming issues for guard variables. and augmenting it with just a few thingsSince this is a complete
that OpenZFS needs.rewrite, Move from using #ifdef guards to #pragma onceuse my copyright here (the original code in FreeBSD still
because FreeBSD 12's linuxkpi compiler.h usecredits everybody).
Remove extra copies of macros the same #at were defines (newerd elsewhere, but are now
versions a different macro). Also, conditionally provide the *_ONCEproperly defined in LinuxKPI so are redundant.
macros since both FreeBSD 12 and 13 don't consistently define them.
Remove extra copies of macros that are defined here.
Sponsored-by: Netflix