Fix build when selinux is disabled but libaudit enabled
authorFrederic Crozat <fcrozat@mandriva.com>
Wed, 3 Mar 2010 13:05:23 +0000 (14:05 +0100)
committerColin Walters <walters@verbum.org>
Wed, 3 Mar 2010 13:19:35 +0000 (08:19 -0500)
https://bugs.freedesktop.org/show_bug.cgi?id=26859

bus/selinux.c

index e61efc5..5a9af5a 100644 (file)
 #include "utils.h"
 #include "config-parser.h"
 
-#ifdef HAVE_SELINUX
-#include <sys/types.h>
-#include <unistd.h>
 #ifdef HAVE_ERRNO_H
 #include <errno.h>
 #endif
+#ifdef HAVE_SELINUX
+#include <sys/types.h>
+#include <unistd.h>
 #include <limits.h>
 #include <pthread.h>
 #include <syslog.h>
 #include <stdarg.h>
 #include <stdio.h>
 #include <grp.h>
+#endif /* HAVE_SELINUX */
 #ifdef HAVE_LIBAUDIT
 #include <cap-ng.h>
 #include <libaudit.h>
 #endif /* HAVE_LIBAUDIT */
-#endif /* HAVE_SELINUX */
 
 #define BUS_SID_FROM_SELINUX(sid)  ((BusSELinuxID*) (sid))
 #define SELINUX_SID_FROM_BUS(sid)  ((security_id_t) (sid))