From 145b7024b5fbb74f16d5e403fb004ff8209bc4a0 Mon Sep 17 00:00:00 2001 From: Elliott Hughes Date: Tue, 2 Aug 2016 11:12:15 -0700 Subject: [PATCH] Fix warning: 'XATTR_NAME_SMACK' macro redefined. Recent Linux uapi headers define XATTR_NAME_SMACK. The include at the top of lib/lsm.h means that even though the direct include of is guarded, it may have already happened transitively anyway. (The alternative fixes would be to hard-code the correct value for XATTR_NAME_SMACK here instead, or #undef XATTR_NAME_SMACK.) --- lib/lsm.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/lsm.h b/lib/lsm.h index 3a5b7ebf..e21d424b 100644 --- a/lib/lsm.h +++ b/lib/lsm.h @@ -23,7 +23,9 @@ #include #include #else +#ifndef XATTR_NAME_SMACK #define XATTR_NAME_SMACK 0 +#endif //ssize_t fgetxattr (int fd, char *name, void *value, size_t size); #define smack_smackfs_path(...) (-1) #define smack_new_label_from_self(...) (-1) -- 2.11.0