Changeset View
Changeset View
Standalone View
Standalone View
sys/contrib/openzfs/include/os/freebsd/spl/rpc/xdr.h
Show All 27 Lines | |||||
*/ | */ | ||||
#ifndef _OPENSOLARIS_RPC_XDR_H_ | #ifndef _OPENSOLARIS_RPC_XDR_H_ | ||||
#define _OPENSOLARIS_RPC_XDR_H_ | #define _OPENSOLARIS_RPC_XDR_H_ | ||||
#include <rpc/types.h> | #include <rpc/types.h> | ||||
#include_next <rpc/xdr.h> | #include_next <rpc/xdr.h> | ||||
#ifndef _KERNEL | #if !defined(_KERNEL) && !defined(_STANDALONE) | ||||
#include <assert.h> | #include <assert.h> | ||||
/* | /* | ||||
* Taken from sys/xdr/xdr_mem.c. | * Taken from sys/xdr/xdr_mem.c. | ||||
* | * | ||||
* FreeBSD's userland XDR doesn't implement control method (only the kernel), | * FreeBSD's userland XDR doesn't implement control method (only the kernel), | ||||
* but OpenSolaris nvpair still depend on it, so we have to implement it here. | * but OpenSolaris nvpair still depend on it, so we have to implement it here. | ||||
Show All 16 Lines | |||||
} | } | ||||
#undef XDR_CONTROL | #undef XDR_CONTROL | ||||
#define XDR_CONTROL(xdrs, req, op) \ | #define XDR_CONTROL(xdrs, req, op) \ | ||||
(((xdrs)->x_ops->x_control == NULL) ? \ | (((xdrs)->x_ops->x_control == NULL) ? \ | ||||
xdrmem_control((xdrs), (req), (op)) : \ | xdrmem_control((xdrs), (req), (op)) : \ | ||||
(*(xdrs)->x_ops->x_control)(xdrs, req, op)) | (*(xdrs)->x_ops->x_control)(xdrs, req, op)) | ||||
#endif /* !_KERNEL */ | #endif /* !_KERNEL && !_STANDALONE */ | ||||
#endif /* !_OPENSOLARIS_RPC_XDR_H_ */ | #endif /* !_OPENSOLARIS_RPC_XDR_H_ */ |