问题
code is working fine on armv7 but compile for arm64 throws this "Declaration of ‘setxattr’ must be imported from module ‘Darwin.POSIX.sys.xattr’ before it is required" error.
u_int8_t b = 1;
setxattr([path fileSystemRepresentation],
"com.apple.MobileBackup", &b, 1, 0, 0);
any help plz?
回答1:
I found the solution.
include #include <sys/xattr.h>
in the class
来源:https://stackoverflow.com/questions/34851876/declaration-of-setxattr-must-be-imported-from-module-darwin-posix-sys-xattr