[systemd-devel] [PATCH 2/2] selinux: avoid inclusion of null_log without selinux

Dave Reisner dreisner at archlinux.org
Fri Jul 27 17:02:00 PDT 2012


Avoids a compile time warning:

  warning: 'null_log' defined but not used [-Wunused-function]
---
 src/core/selinux-setup.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/core/selinux-setup.c b/src/core/selinux-setup.c
index 22ca820..fa025b7 100644
--- a/src/core/selinux-setup.c
+++ b/src/core/selinux-setup.c
@@ -36,9 +36,11 @@
 #include "log.h"
 #include "label.h"
 
+#ifdef HAVE_SELINUX
 static int null_log(int type, const char *fmt, ...) {
         return 0;
 }
+#endif
 
 int selinux_setup(bool *loaded_policy) {
 
-- 
1.7.11.3



More information about the systemd-devel mailing list