nvpair: chase FreeBSD xdrproc_t definition

As of FreeBSD 16, xdrproc_t will take exactly two arguments in both
kernel and userspace in line with the Linux kernel.

Reviewed-by: Alexander Motin <alexander.motin@TrueNAS.com>
Reviewed-by: Alan Somers <asomers@freebsd.org>
Signed-off-by:	Brooks Davis <brooks@capabilitieslimited.co.uk>
Closes #18154
This commit is contained in:
Brooks Davis 2026-01-29 02:41:33 +00:00 committed by GitHub
parent a157ef62a1
commit b364720524
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -3246,7 +3246,8 @@ nvs_xdr_nvl_fini(nvstream_t *nvs)
* xdrproc_t-compatible callbacks for xdr_array()
*/
#if defined(_KERNEL) && defined(__linux__) /* Linux kernel */
#if (defined(__FreeBSD_version) && __FreeBSD_version >= 1600010) || \
defined(_KERNEL) && defined(__linux__) /* Linux kernel */
#define NVS_BUILD_XDRPROC_T(type) \
static bool_t \
@ -3255,7 +3256,7 @@ nvs_xdr_nvp_##type(XDR *xdrs, void *ptr) \
return (xdr_##type(xdrs, ptr)); \
}
#elif !defined(_KERNEL) && defined(XDR_CONTROL) /* tirpc */
#elif !defined(_KERNEL) && defined(XDR_CONTROL) /* tirpc, FreeBSD < 16 */
#define NVS_BUILD_XDRPROC_T(type) \
static bool_t \
@ -3271,7 +3272,7 @@ nvs_xdr_nvp_##type(XDR *xdrs, ...) \
return (xdr_##type(xdrs, ptr)); \
}
#else /* FreeBSD, sunrpc */
#else /* FreeBSD kernel < 16, sunrpc */
#define NVS_BUILD_XDRPROC_T(type) \
static bool_t \