blob: 8942ad7828bc55f4812b7a415dc3890b2f32bfaa [file] [log] [blame]
Andrew Geissler90fd73c2021-03-05 15:25:55 -06001From 2396fd67d81e54e18fbad67a5ff67d5684a01013 Mon Sep 17 00:00:00 2001
Brad Bishopd7bf8c12018-02-25 22:55:05 -05002From: Hongxu Jia <hongxu.jia@windriver.com>
3Date: Tue, 15 Aug 2017 17:27:30 +0800
Brad Bishop19323692019-04-05 15:28:33 -04004Subject: [PATCH] Fix build on aarch64/musl
Brad Bishopd7bf8c12018-02-25 22:55:05 -05005
6Errors
7
8invalid operands to binary & (have 'long double' and 'unsigned int')
9
10error: redefinition
11 of 'struct iovec'
12 struct iovec { void *iov_base; size_t iov_len; };
13 ^
14Upstream-Status: Pending
15Signed-off-by: Khem Raj <raj.khem@gmail.com>
16
17Rebase to 0.170
18Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
Brad Bishop19323692019-04-05 15:28:33 -040019
Brad Bishopd7bf8c12018-02-25 22:55:05 -050020---
21 backends/aarch64_initreg.c | 4 ++--
22 backends/arm_initreg.c | 2 +-
23 2 files changed, 3 insertions(+), 3 deletions(-)
24
25diff --git a/backends/aarch64_initreg.c b/backends/aarch64_initreg.c
26index daf6f37..6445276 100644
27--- a/backends/aarch64_initreg.c
28+++ b/backends/aarch64_initreg.c
29@@ -33,7 +33,7 @@
30 #include "system.h"
31 #include <assert.h>
32 #if defined(__aarch64__) && defined(__linux__)
33-# include <linux/uio.h>
34+# include <sys/uio.h>
35 # include <sys/user.h>
36 # include <sys/ptrace.h>
37 /* Deal with old glibc defining user_pt_regs instead of user_regs_struct. */
38@@ -82,7 +82,7 @@ aarch64_set_initial_registers_tid (pid_t tid __attribute__ ((unused)),
39
40 Dwarf_Word dwarf_fregs[32];
41 for (int r = 0; r < 32; r++)
42- dwarf_fregs[r] = fregs.vregs[r] & 0xFFFFFFFF;
43+ dwarf_fregs[r] = (unsigned int)fregs.vregs[r] & 0xFFFFFFFF;
44
45 if (! setfunc (64, 32, dwarf_fregs, arg))
46 return false;
47diff --git a/backends/arm_initreg.c b/backends/arm_initreg.c
48index efcabaf..062bb9e 100644
49--- a/backends/arm_initreg.c
50+++ b/backends/arm_initreg.c
51@@ -38,7 +38,7 @@
52 #endif
53
54 #ifdef __aarch64__
55-# include <linux/uio.h>
56+# include <sys/uio.h>
57 # include <sys/user.h>
58 # include <sys/ptrace.h>
59 /* Deal with old glibc defining user_pt_regs instead of user_regs_struct. */