chiark / gitweb /
vim: Update to lastest patch
[termux-packages] / ndk_patches / sys-user.h.patch
1 diff -u -r /home/fornwall/lib/android-ndk/platforms/android-21/arch-arm64/usr/include/sys/user.h ./usr/include/sys/user.h
2 --- /home/fornwall/lib/android-ndk/platforms/android-21/arch-arm64/usr/include/sys/user.h       2014-12-08 21:59:41.000000000 -0500
3 +++ ./usr/include/sys/user.h    2016-01-08 20:08:08.327228220 -0500
4 @@ -99,6 +99,13 @@
5    int u_debugreg[8];
6  };
7  
8 +/* Needed by binutils on x86 */
9 +/* http://osxr.org/android/source/bionic/libc/kernel/arch-x86/asm/user_32.h#0089 */
10 +#define NBPG PAGE_SIZE
11 +#define UPAGES 1
12 +#define HOST_TEXT_START_ADDR (u.start_code)
13 +#define HOST_STACK_END_ADDR (u.start_stack + u.u_ssize * NBPG)
14 +
15  #elif defined(__x86_64__)
16  
17  struct user_fpregs_struct {
18 @@ -234,7 +240,18 @@
19  
20  #elif defined(__aarch64__)
21  
22 -// There are no user structures for 64 bit arm.
23 +/* From https://codereview.chromium.org/1291983003 */
24 +struct user_regs_struct {
25 +  __u64 regs[31];
26 +  __u64 sp;
27 +  __u64 pc;
28 +  __u64 pstate;
29 +};
30 +struct user_fpsimd_struct {
31 +  __uint128_t vregs[32];
32 +  __u32 fpsr;
33 +  __u32 fpcr;
34 +};
35  
36  #else
37