aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/portability.h9
-rwxr-xr-xscripts/make.sh2
2 files changed, 10 insertions, 1 deletions
diff --git a/lib/portability.h b/lib/portability.h
index f23d4f6e..740a4ee5 100644
--- a/lib/portability.h
+++ b/lib/portability.h
@@ -249,4 +249,13 @@ int getcon(void* con);
#if CFG_TOYBOX_SMACK
#include <sys/smack.h>
+#include <sys/xattr.h>
+#include <linux/xattr.h>
+#else
+#define smack_new_label_from_path(...) (-1)
+#define smack_set_label_for_path(...) (-1)
+#define smack_set_label_for_self(...) (-1)
+#define XATTR_NAME_SMACK ""
+#define SMACK_LABEL_LEN (1) /* for just ? */
#endif
+
diff --git a/scripts/make.sh b/scripts/make.sh
index 3d9eed3f..56fcc7e7 100755
--- a/scripts/make.sh
+++ b/scripts/make.sh
@@ -92,7 +92,7 @@ then
# for it.
> generated/optlibs.dat
- for i in util crypt m resolv selinux
+ for i in util crypt m resolv selinux smack attr
do
echo "int main(int argc, char *argv[]) {return 0;}" | \
${CROSS_COMPILE}${CC} $CFLAGS -xc - -o /dev/null -Wl,--as-needed -l$i > /dev/null 2>/dev/null &&