From 137d26e8a378c50b439f3bc3f26ea5d7660c5607 Mon Sep 17 00:00:00 2001 From: Andriy Gapon Date: Thu, 3 Sep 2020 20:30:52 +0000 Subject: mac_framework.h: fix build with DEBUG_VFS_LOCKS and !MAC I have such a custom kernel configuration and its build failed with: linking kernel.full ld: error: undefined symbol: mac_vnode_assert_locked >>> referenced by mac_framework.h:556 (/usr/devel/git/apu2c4/sys/security/mac/mac_framework.h:556) >>> tmpfs_vnops.o:(mac_vnode_check_stat) >>> referenced by mac_framework.h:556 (/usr/devel/git/apu2c4/sys/security/mac/mac_framework.h:556) >>> vfs_default.o:(mac_vnode_check_stat) >>> referenced by mac_framework.h:556 (/usr/devel/git/apu2c4/sys/security/mac/mac_framework.h:556) >>> ufs_vnops.o:(mac_vnode_check_stat) --- sys/security/mac/mac_framework.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/security/mac/mac_framework.h b/sys/security/mac/mac_framework.h index fed574d361354..c9a0ae3ce1dae 100644 --- a/sys/security/mac/mac_framework.h +++ b/sys/security/mac/mac_framework.h @@ -400,7 +400,7 @@ void mac_sysvshm_init(struct shmid_kernel *); void mac_thread_userret(struct thread *td); -#ifdef DEBUG_VFS_LOCKS +#if defined(MAC) && defined(DEBUG_VFS_LOCKS) void mac_vnode_assert_locked(struct vnode *vp, const char *func); #else #define mac_vnode_assert_locked(vp, func) do { } while (0) -- cgit v1.2.3