diff options
author | John Baldwin <jhb@FreeBSD.org> | 2022-07-20 23:02:56 +0000 |
---|---|---|
committer | John Baldwin <jhb@FreeBSD.org> | 2022-07-20 23:02:56 +0000 |
commit | b43b8f81578cbb7bddbd6f7b8ebe06a219c88140 (patch) | |
tree | face29f16aa7f5a45e018f6cf059346ad1641fc7 /sys | |
parent | e5d24f634e81456f08458756eb2562c3f15396ba (diff) | |
download | src-b43b8f81578cbb7bddbd6f7b8ebe06a219c88140.tar.gz src-b43b8f81578cbb7bddbd6f7b8ebe06a219c88140.zip |
mac_ddb: Only include the vnet validator in VIMAGE kernels.
This fixes the build of at least i386 MINIMAL which was failing with
the error:
sys/security/mac_ddb/mac_ddb.c:200:15: error: use of undeclared identifier 'vnet'; did you mean 'int'?
if ((void *)vnet == (void *)addr)
^~~~
int
Sponsored by: DARPA
Diffstat (limited to 'sys')
-rw-r--r-- | sys/security/mac_ddb/mac_ddb.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/sys/security/mac_ddb/mac_ddb.c b/sys/security/mac_ddb/mac_ddb.c index 89cba3145945..847be4997226 100644 --- a/sys/security/mac_ddb/mac_ddb.c +++ b/sys/security/mac_ddb/mac_ddb.c @@ -77,7 +77,9 @@ static db_validation_fn_t db_show_ffs_valid; static db_validation_fn_t db_show_prison_valid; static db_validation_fn_t db_show_proc_valid; static db_validation_fn_t db_show_rman_valid; +#ifdef VIMAGE static db_validation_fn_t db_show_vnet_valid; +#endif struct cmd_list_item { const char *name; @@ -96,7 +98,9 @@ static const struct cmd_list_item show_command_list[] = { { "proc", db_show_proc_valid }, { "rman", db_show_rman_valid }, { "thread", db_thread_valid }, +#ifdef VIMAGE { "vnet", db_show_vnet_valid }, +#endif }; static int @@ -188,6 +192,7 @@ db_show_rman_valid(db_expr_t addr, bool have_addr, db_expr_t count, char *modif) return (EACCES); } +#ifdef VIMAGE static int db_show_vnet_valid(db_expr_t addr, bool have_addr, db_expr_t count, char *modif) { @@ -203,6 +208,7 @@ db_show_vnet_valid(db_expr_t addr, bool have_addr, db_expr_t count, char *modif) return (EACCES); } +#endif static int command_match(struct db_command *cmd, struct cmd_list_item item) |