Merge "Fix perf_event_open syscall for x86 and mips"
diff --git a/libc/SYSCALLS.TXT b/libc/SYSCALLS.TXT
index d79e6f3..58e0ac1 100644
--- a/libc/SYSCALLS.TXT
+++ b/libc/SYSCALLS.TXT
@@ -288,7 +288,7 @@
int klogctl:syslog(int, char *, int) 103
int sysinfo(struct sysinfo *) 116
int personality(unsigned long) 136
-long perf_event_open(struct perf_event_attr *attr_uptr, pid_t pid, int cpu, int group_fd, unsigned long flags) 364
+long perf_event_open(struct perf_event_attr *attr_uptr, pid_t pid, int cpu, int group_fd, unsigned long flags) 364,336,333
# futex
int futex(void *, int, int, void *, void *, int) 240,240,238
diff --git a/libc/include/sys/linux-syscalls.h b/libc/include/sys/linux-syscalls.h
index 89ab167..f2249fd 100644
--- a/libc/include/sys/linux-syscalls.h
+++ b/libc/include/sys/linux-syscalls.h
@@ -84,7 +84,6 @@
#define __NR_readv (__NR_SYSCALL_BASE + 145)
#define __NR_writev (__NR_SYSCALL_BASE + 146)
#define __NR_getsid (__NR_SYSCALL_BASE + 147)
-#define __NR_perf_event_open (__NR_SYSCALL_BASE + 364)
#ifdef __arm__
#define __NR_exit_group (__NR_SYSCALL_BASE + 248)
@@ -202,6 +201,7 @@
#define __NR_getcpu (__NR_SYSCALL_BASE + 345)
#define __NR_ioprio_set (__NR_SYSCALL_BASE + 314)
#define __NR_ioprio_get (__NR_SYSCALL_BASE + 315)
+#define __NR_perf_event_open (__NR_SYSCALL_BASE + 364)
#define __NR_futex (__NR_SYSCALL_BASE + 240)
#define __NR_epoll_create (__NR_SYSCALL_BASE + 250)
#define __NR_epoll_ctl (__NR_SYSCALL_BASE + 251)
@@ -330,6 +330,7 @@
#define __NR_utimensat (__NR_SYSCALL_BASE + 320)
#define __NR_eventfd2 (__NR_SYSCALL_BASE + 328)
#define __NR_pipe2 (__NR_SYSCALL_BASE + 331)
+#define __NR_perf_event_open (__NR_SYSCALL_BASE + 336)
#endif
#ifdef __mips__
@@ -462,6 +463,7 @@
#define __NR_utimensat (__NR_SYSCALL_BASE + 316)
#define __NR_eventfd2 (__NR_SYSCALL_BASE + 325)
#define __NR_pipe2 (__NR_SYSCALL_BASE + 328)
+#define __NR_perf_event_open (__NR_SYSCALL_BASE + 333)
#endif
#endif