Add extended attribute (xattr) system call wrappers to bionic.
The xattr system calls are required for the SE Android userspace in
order to get and set file security contexts. In particular, libselinux
requires these calls.
Change-Id: I78f5eb3d8f3384aed0a5e7c6a6f001781d982017
diff --git a/libc/include/sys/linux-syscalls.h b/libc/include/sys/linux-syscalls.h
index 2fa5d3a..54f86f8 100644
--- a/libc/include/sys/linux-syscalls.h
+++ b/libc/include/sys/linux-syscalls.h
@@ -79,6 +79,10 @@
#define __NR_sync (__NR_SYSCALL_BASE + 36)
#define __NR_fcntl64 (__NR_SYSCALL_BASE + 221)
#define __NR_sendfile (__NR_SYSCALL_BASE + 187)
+#define __NR_fsetxattr (__NR_SYSCALL_BASE + 228)
+#define __NR_fgetxattr (__NR_SYSCALL_BASE + 231)
+#define __NR_flistxattr (__NR_SYSCALL_BASE + 234)
+#define __NR_fremovexattr (__NR_SYSCALL_BASE + 237)
#define __NR_link (__NR_SYSCALL_BASE + 9)
#define __NR_unlink (__NR_SYSCALL_BASE + 10)
#define __NR_chdir (__NR_SYSCALL_BASE + 12)
@@ -100,6 +104,14 @@
#define __NR_symlink (__NR_SYSCALL_BASE + 83)
#define __NR_fchdir (__NR_SYSCALL_BASE + 133)
#define __NR_truncate (__NR_SYSCALL_BASE + 92)
+#define __NR_setxattr (__NR_SYSCALL_BASE + 226)
+#define __NR_lsetxattr (__NR_SYSCALL_BASE + 227)
+#define __NR_getxattr (__NR_SYSCALL_BASE + 229)
+#define __NR_lgetxattr (__NR_SYSCALL_BASE + 230)
+#define __NR_listxattr (__NR_SYSCALL_BASE + 232)
+#define __NR_llistxattr (__NR_SYSCALL_BASE + 233)
+#define __NR_removexattr (__NR_SYSCALL_BASE + 235)
+#define __NR_lremovexattr (__NR_SYSCALL_BASE + 236)
#define __NR_pause (__NR_SYSCALL_BASE + 29)
#define __NR_gettimeofday (__NR_SYSCALL_BASE + 78)
#define __NR_settimeofday (__NR_SYSCALL_BASE + 79)