summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2011-07-11 22:29:45 +0200
committerLennart Poettering <lennart@poettering.net>2011-07-11 22:29:45 +0200
commit2fb1aedaf2493d9598693c123d5e9c168ca1b3c1 (patch)
tree5ad52918e17d8e894aa4943ba5622f5983d8167c /src
parent4e7f8bc81c6422c59ab644fcea28b6f32be416e9 (diff)
logind: Fix compilation without ACL
Compilation fails if sys/acl.h is not available. The configure script already tests for sys/acl.h presence, but the result was so far unused. To compile without acl, stub implementations of the acl functions are used.
Diffstat (limited to 'src')
-rw-r--r--src/logind-acl.h20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/logind-acl.h b/src/logind-acl.h
index 9c88a80644..72740f5b95 100644
--- a/src/logind-acl.h
+++ b/src/logind-acl.h
@@ -26,6 +26,8 @@
#include <stdbool.h>
#include <libudev.h>
+#ifdef HAVE_ACL
+
int devnode_acl(const char *path,
bool flush,
bool del, uid_t old_uid,
@@ -36,5 +38,23 @@ int devnode_acl_all(struct udev *udev,
bool flush,
bool del, uid_t old_uid,
bool add, uid_t new_uid);
+#else
+
+static inline int devnode_acl(const char *path,
+ bool flush,
+ bool del, uid_t old_uid,
+ bool add, uid_t new_uid) {
+ return 0;
+}
+
+static inline int devnode_acl_all(struct udev *udev,
+ const char *seat,
+ bool flush,
+ bool del, uid_t old_uid,
+ bool add, uid_t new_uid) {
+ return 0;
+}
+
+#endif
#endif