blob: 40b8544fa51a77d342b2ed022e58af1ee3ad4dd5 [file] [log] [blame]
Brad Bishop1a4b7ee2018-12-16 17:11:34 -08001From b4ec05953f78af26bcd7de45a5bbc5f138d023da 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
4Subject: [PATCH 6/7] Fix build on aarch64/musl
5
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>
19---
20 backends/aarch64_initreg.c | 4 ++--
21 backends/arm_initreg.c | 2 +-
22 2 files changed, 3 insertions(+), 3 deletions(-)
23
24diff --git a/backends/aarch64_initreg.c b/backends/aarch64_initreg.c
25index daf6f37..6445276 100644
26--- a/backends/aarch64_initreg.c
27+++ b/backends/aarch64_initreg.c
28@@ -33,7 +33,7 @@
29 #include "system.h"
30 #include <assert.h>
31 #if defined(__aarch64__) && defined(__linux__)
32-# include <linux/uio.h>
33+# include <sys/uio.h>
34 # include <sys/user.h>
35 # include <sys/ptrace.h>
36 /* Deal with old glibc defining user_pt_regs instead of user_regs_struct. */
37@@ -82,7 +82,7 @@ aarch64_set_initial_registers_tid (pid_t tid __attribute__ ((unused)),
38
39 Dwarf_Word dwarf_fregs[32];
40 for (int r = 0; r < 32; r++)
41- dwarf_fregs[r] = fregs.vregs[r] & 0xFFFFFFFF;
42+ dwarf_fregs[r] = (unsigned int)fregs.vregs[r] & 0xFFFFFFFF;
43
44 if (! setfunc (64, 32, dwarf_fregs, arg))
45 return false;
46diff --git a/backends/arm_initreg.c b/backends/arm_initreg.c
47index efcabaf..062bb9e 100644
48--- a/backends/arm_initreg.c
49+++ b/backends/arm_initreg.c
50@@ -38,7 +38,7 @@
51 #endif
52
53 #ifdef __aarch64__
54-# include <linux/uio.h>
55+# include <sys/uio.h>
56 # include <sys/user.h>
57 # include <sys/ptrace.h>
58 /* Deal with old glibc defining user_pt_regs instead of user_regs_struct. */
59--
Brad Bishop1a4b7ee2018-12-16 17:11:34 -0800602.7.4
Brad Bishopd7bf8c12018-02-25 22:55:05 -050061