aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/lsm.h3
-rw-r--r--toys/posix/cp.c4
2 files changed, 2 insertions, 5 deletions
diff --git a/lib/lsm.h b/lib/lsm.h
index d7e7de9c..3a5b7ebf 100644
--- a/lib/lsm.h
+++ b/lib/lsm.h
@@ -3,6 +3,8 @@
* Copyright 2015 Rob Landley <rob@landley.net>
*/
+#include <sys/xattr.h>
+
#if CFG_TOYBOX_SELINUX
#include <selinux/selinux.h>
#else
@@ -19,7 +21,6 @@
#if CFG_TOYBOX_SMACK
#include <sys/smack.h>
-#include <sys/xattr.h>
#include <linux/xattr.h>
#else
#define XATTR_NAME_SMACK 0
diff --git a/toys/posix/cp.c b/toys/posix/cp.c
index 0e6a2efa..32502656 100644
--- a/toys/posix/cp.c
+++ b/toys/posix/cp.c
@@ -107,9 +107,6 @@ config INSTALL
#define FOR_cp
#include "toys.h"
-#if CFG_CP_PRESERVE
-#include <sys/xattr.h>
-#endif
GLOBALS(
union {
@@ -404,7 +401,6 @@ void cp_main(void)
// Loop through sources
for (i=0; i<toys.optc; i++) {
- struct dirtree *new;
char *src = toys.optargs[i];
int rc = 1;