summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRich Felker <dalias@aerifal.cx>2019-09-29 23:45:47 -0400
committerRich Felker <dalias@aerifal.cx>2019-09-29 23:45:47 -0400
commit2c2477da9a553c0b9b2fa18073a5dcdbe6d395af (patch)
tree406d4610fc3026fb7b936cf4e83c1635ffa3a379
parentab3eb89a8b83353cdaab12ed017a67a7730f90e9 (diff)
downloadmusl-2c2477da9a553c0b9b2fa18073a5dcdbe6d395af.tar.gz
fix riscv64 elf_fpregset_t type and member names mismatch
in order for sys/procfs.h (provided by sys/user.h) to be useful, it needs to match the API its consumers (gdb, etc.) expect, including the member names established by glibc. this partly reverts commit 29e8737f81ccc9fbadcf61a75318aa3d0516aafa, which partly reverted d493206de7df4db07ad34f24701539ba0a6ed38c, eliminating struct user_fpregs_struct which seems to have had no precedent and using union __riscv_mc_fp_state for elf_fpregset_t. this requires indirect inclusion of signal.h to make union __riscv_mc_fp_state visible, but being that these are nonstandard "junk" headers with no official restrictions on what they can pull in, that's no big deal. split off and expanded from patch by Khem Raj.
-rw-r--r--arch/riscv64/bits/user.h7
1 files changed, 2 insertions, 5 deletions
diff --git a/arch/riscv64/bits/user.h b/arch/riscv64/bits/user.h
index d2e383b2..2da743ea 100644
--- a/arch/riscv64/bits/user.h
+++ b/arch/riscv64/bits/user.h
@@ -1,8 +1,5 @@
-struct user_fpregs_struct {
- double f[32];
- unsigned int fcsr;
-};
+#include <signal.h>
#define ELF_NGREG 32
typedef unsigned long elf_greg_t, elf_gregset_t[ELF_NGREG];
-typedef struct user_fpregs_struct elf_fpregset_t;
+typedef union __riscv_mc_fp_state elf_fpregset_t;