summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2014-12-04 16:17:18 +0100
committerAnthony G. Basile <blueness@gentoo.org>2014-12-04 17:38:11 -0500
commitf31810b0382e397278e4546ad1208afda68a7be4 (patch)
tree76149da109cefc59e44159245f754b0783bf512c /src
parenta2e46b539b55e3115af65ae7a4c36e80a2ae6abc (diff)
smack-util: remove warning when building without SMACK support
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
Diffstat (limited to 'src')
-rw-r--r--src/shared/smack-util.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/shared/smack-util.c b/src/shared/smack-util.c
index c8f052cec9..65bbb94e7c 100644
--- a/src/shared/smack-util.c
+++ b/src/shared/smack-util.c
@@ -125,8 +125,11 @@ int mac_smack_apply_ip_in_fd(int fd, const char *label) {
}
int mac_smack_apply_pid(pid_t pid, const char *label) {
- int r = 0;
+
+#ifdef HAVE_SMACK
const char *p;
+#endif
+ int r = 0;
assert(label);
@@ -144,13 +147,15 @@ int mac_smack_apply_pid(pid_t pid, const char *label) {
}
int mac_smack_fix(const char *path, bool ignore_enoent, bool ignore_erofs) {
- int r = 0;
#ifdef HAVE_SMACK
struct stat st;
+#endif
+ int r = 0;
assert(path);
+#ifdef HAVE_SMACK
if (!mac_smack_use())
return 0;
@@ -194,8 +199,7 @@ int mac_smack_fix(const char *path, bool ignore_enoent, bool ignore_erofs) {
if (ignore_erofs && errno == EROFS)
return 0;
- log_debug_errno(errno, "Unable to fix SMACK label of %s: %m", path);
- r = -errno;
+ r = log_debug_errno(errno, "Unable to fix SMACK label of %s: %m", path);
}
#endif