Those macros are also defined by the compiler-provided float.h which will be
included later on and trigger these warnings. Include <float.h> first and only
define the macros when missing to fix this problem.
Could we make this change upstream (in OpenZFS) rather than having to maintain the diff in freebsd? Or, would someone mind explaining when we would change the contrib files in FreeBSD vs changing them upstream?
Changes to contrib should always be made in the following order when possible:
a) update upstream
b) update vendor branch with latest changeset
c) merge vendor branch in to HEAD
Thus the first step is to open a PR with openzfs.
We may eventually relax the ordering if this proves too onerous for something as tightly coupled as ZFS and transition to "eventual consistency" whereby contrib + vendor + upstream are eventually the same.