diff --git a/include/rpc/xdr.h b/include/rpc/xdr.h index ecf10e1659e..4c75bcc5bbf 100644 --- a/include/rpc/xdr.h +++ b/include/rpc/xdr.h @@ -129,14 +129,7 @@ typedef struct XDR { * to be decoded. If this pointer is 0, then the type routines should * allocate dynamic storage of the appropriate size and return it. */ -#ifdef _KERNEL -typedef bool_t (*xdrproc_t)(XDR *, void *, u_int); -#else -/* - * XXX can't actually prototype it, because some take three args!!! - */ -typedef bool_t (*xdrproc_t)(XDR *, ...); -#endif +typedef bool_t (*xdrproc_t)(XDR *, void *); /* * Operations defined on a XDR handle diff --git a/lib/libc/rpc/rpc.3 b/lib/libc/rpc/rpc.3 index 12d19df117a..7ae3ec5c5ae 100644 --- a/lib/libc/rpc/rpc.3 +++ b/lib/libc/rpc/rpc.3 @@ -254,9 +254,9 @@ enum xdr_op { * structure of the data type to be decoded. If this points to 0, * then the type routines should allocate dynamic storage of the * appropriate size and return it. - * bool_t (*xdrproc_t)(XDR *, caddr_t *); + * bool_t (*xdrproc_t)(XDR *, void *); */ -typedef bool_t (*xdrproc_t)(); +typedef bool_t (*xdrproc_t)(XDR *, void *); /* * The XDR handle. diff --git a/sys/contrib/openzfs/module/nvpair/nvpair.c b/sys/contrib/openzfs/module/nvpair/nvpair.c index eb8c14b4a78..cb3a024ec95 100644 --- a/sys/contrib/openzfs/module/nvpair/nvpair.c +++ b/sys/contrib/openzfs/module/nvpair/nvpair.c @@ -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 \ diff --git a/sys/rpc/xdr.h b/sys/rpc/xdr.h index 4307b510147..b3eafcb864b 100644 --- a/sys/rpc/xdr.h +++ b/sys/rpc/xdr.h @@ -133,14 +133,7 @@ typedef struct XDR { * to be decoded. If this pointer is 0, then the type routines should * allocate dynamic storage of the appropriate size and return it. */ -#ifdef _KERNEL -typedef bool_t (*xdrproc_t)(XDR *, void *, ...); -#else -/* - * XXX can't actually prototype it, because some take three args!!! - */ -typedef bool_t (*xdrproc_t)(XDR *, ...); -#endif +typedef bool_t (*xdrproc_t)(XDR *, void *); /* * Operations defined on a XDR handle diff --git a/sys/sys/param.h b/sys/sys/param.h index a5dd31519ea..410d18b53df 100644 --- a/sys/sys/param.h +++ b/sys/sys/param.h @@ -74,7 +74,7 @@ * cannot include sys/param.h and should only be updated here. */ #undef __FreeBSD_version -#define __FreeBSD_version 1600009 +#define __FreeBSD_version 1600010 /* * __FreeBSD_kernel__ indicates that this system uses the kernel of FreeBSD,