summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2020-03-19 02:44:16 +0100
committerDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2020-03-19 02:44:42 +0100
commite29f695f32b86918277dcc226d613e85cb5b838e (patch)
tree0974874bffa4bdbab08e0109c2c3c33d804be283
parentdf24b3a070cc50e521b21fc2877e5b3985535a73 (diff)
Add macOS workaround for lsetxattr
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
-rw-r--r--unpack/rdsquashfs.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/unpack/rdsquashfs.h b/unpack/rdsquashfs.h
index dc9d68c..17c0a85 100644
--- a/unpack/rdsquashfs.h
+++ b/unpack/rdsquashfs.h
@@ -17,6 +17,11 @@
#endif
#ifdef HAVE_SYS_XATTR_H
#include <sys/xattr.h>
+
+#if defined(__APPLE__) && defined(__MACH__)
+#define lsetxattr(path, name, value, size, flags) \
+ setxattr(path, name, value, size, 0, flags | XATTR_NOFOLLOW)
+#endif
#endif
#include <string.h>
#include <stdlib.h>