Link against libattr and libsmack.
authorXavier Roche <xavier.roche@open.eurogiciel.org>
Sat, 18 Apr 2015 01:18:30 +0000 (20:18 -0500)
committerRob Landley <rob@landley.net>
Sat, 18 Apr 2015 01:18:30 +0000 (20:18 -0500)
lib/portability.h
scripts/make.sh

index f23d4f6..740a4ee 100644 (file)
@@ -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
+
index 3d9eed3..56fcc7e 100755 (executable)
@@ -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 &&