chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
missing: if RLIMIT_RTTIME is not defined by the libc, then we need a new define for...
[elogind.git]
/
src
/
shared
/
selinux-util.c
diff --git
a/src/shared/selinux-util.c
b/src/shared/selinux-util.c
index 4310a975391d89468a6f5282eeab7e5cad9243cc..026ae5a9e85b2f8e793f80e3a05fbf939d8134ec 100644
(file)
--- a/
src/shared/selinux-util.c
+++ b/
src/shared/selinux-util.c
@@
-19,10
+19,12
@@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
-#include <selinux/selinux.h>
-
#include "selinux-util.h"
#include "selinux-util.h"
+#ifdef HAVE_SELINUX
+
+#include <selinux/selinux.h>
+
static int use_selinux_cached = -1;
bool use_selinux(void) {
static int use_selinux_cached = -1;
bool use_selinux(void) {
@@
-36,3
+38,14
@@
bool use_selinux(void) {
void retest_selinux(void) {
use_selinux_cached = -1;
}
void retest_selinux(void) {
use_selinux_cached = -1;
}
+
+#else
+
+bool use_selinux(void) {
+ return false;
+}
+
+void retest_selinux(void) {
+}
+
+#endif