The SYS_ constants should cover all __NR_ values.
<sys/linux-syscalls.h> only contains constants for the syscalls
we're generating stubs for. We want all the syscalls available
on the architecture in question.
Keep using <sys/linux-syscalls.h> on ARM for now because the
__NR_ARM_set_tls and __NR_ARM_cacheflush values aren't in <asm/unistd.h>.
Change-Id: I66683950d87d9b18d6107d0acc0ed238a4496f44
diff --git a/libc/arch-arm/bionic/tkill.S b/libc/arch-arm/bionic/tkill.S
index d5bb739..fd6e21e 100644
--- a/libc/arch-arm/bionic/tkill.S
+++ b/libc/arch-arm/bionic/tkill.S
@@ -25,6 +25,11 @@
* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*/
+
+#include <linux/err.h>
+#include <asm/unistd.h>
+#include <machine/asm.h>
+
/* unlike our auto-generated syscall stubs, this code saves lr
on the stack, as well as a few other registers. this makes
our stack unwinder happy, when we generate debug stack
@@ -33,14 +38,6 @@
of a corrupted malloc heap).
*/
-#include <linux/err.h>
-#include <sys/linux-syscalls.h>
-#include <machine/asm.h>
-
-#ifndef __NR_tkill
-#define __NR_tkill 238
-#endif
-
ENTRY(tkill)
stmfd sp!, {r4-r7, ip, lr}
ldr r7, =__NR_tkill