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)
This commit is contained in:
Andriy Gapon 2020-09-03 20:30:52 +00:00
parent 031db28b2b
commit 137d26e8a3
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=365308

View File

@ -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)