Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 3 Sep 2020 20:30:52 +0000 (UTC)
From:      Andriy Gapon <avg@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r365308 - head/sys/security/mac
Message-ID:  <202009032030.083KUqF0082990@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: avg
Date: Thu Sep  3 20:30:52 2020
New Revision: 365308
URL: https://svnweb.freebsd.org/changeset/base/365308

Log:
  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)

Modified:
  head/sys/security/mac/mac_framework.h

Modified: head/sys/security/mac/mac_framework.h
==============================================================================
--- head/sys/security/mac/mac_framework.h	Thu Sep  3 18:34:01 2020	(r365307)
+++ head/sys/security/mac/mac_framework.h	Thu Sep  3 20:30:52 2020	(r365308)
@@ -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)



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202009032030.083KUqF0082990>