From 24946289317ea23bb0d1814cca0a499a905f7d6f Mon Sep 17 00:00:00 2001 From: Alexey Brodkin Date: Thu, 26 Mar 2015 14:25:37 +0530 Subject: ARC: don't hard-code ELF_NGREG Signed-off-by: Alexey Brodkin Signed-off-by: Vineet Gupta [updated changelog] Signed-off-by: Vineet Gupta Signed-off-by: Bernhard Reutner-Fischer --- libc/sysdeps/linux/arc/sys/procfs.h | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/libc/sysdeps/linux/arc/sys/procfs.h b/libc/sysdeps/linux/arc/sys/procfs.h index a9e375b33..a47430340 100755 --- a/libc/sysdeps/linux/arc/sys/procfs.h +++ b/libc/sysdeps/linux/arc/sys/procfs.h @@ -20,17 +20,14 @@ #include #include #include +#include __BEGIN_DECLS /* Type for a general-purpose register. */ typedef unsigned long elf_greg_t; -/* And the whole bunch of them. We could have used `struct - user_regs' directly in the typedef, but tradition says that - the register set is an array, which does have some peculiar - semantics, so leave it that way. */ -#define ELF_NGREG 40 +#define ELF_NGREG (sizeof (struct user_regs_struct) / sizeof(elf_greg_t)) typedef elf_greg_t elf_gregset_t[ELF_NGREG]; typedef struct { } elf_fpregset_t; -- cgit v1.2.3