FreeBSD: make adjustments for the standalone environment

In FreeBSD, there are three compile environments that are supported:
user land, the kernel and the bootloader / standalone. Adjust the
headers to compile in the standalone environment. Limit kernel-only
items from view when _STANDALONE is defined.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Ryan Moeller <ryan@iXsystems.com>
Signed-off-by: Warner Losh <imp@FreeBSD.org>
Closes #10998
This commit is contained in:
Warner Losh
2020-10-13 22:05:49 -06:00
committed by GitHub
parent 57dc5d42b1
commit b302185a92
20 changed files with 102 additions and 34 deletions
+2 -2
View File
@@ -33,7 +33,7 @@
#include <rpc/types.h>
#include_next <rpc/xdr.h>
#ifndef _KERNEL
#if !defined(_KERNEL) && !defined(_STANDALONE)
#include <assert.h>
@@ -66,6 +66,6 @@ xdrmem_control(XDR *xdrs, int request, void *info)
xdrmem_control((xdrs), (req), (op)) : \
(*(xdrs)->x_ops->x_control)(xdrs, req, op))
#endif /* !_KERNEL */
#endif /* !_KERNEL && !_STANDALONE */
#endif /* !_OPENSOLARIS_RPC_XDR_H_ */