summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/elfutils/elfutils-0.168/aarch64_uio.patch
blob: 38dc57befcaece3f4ec5bf91d87e23ef4c904b41 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
Fix build on aarch64/musl

Errors

invalid operands to binary & (have 'long double' and 'unsigned int')

error: redefinition
 of 'struct iovec'
 struct iovec { void *iov_base; size_t iov_len; };
        ^
Upstream-Status: Pending
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Index: elfutils-0.163/backends/aarch64_initreg.c
===================================================================
--- elfutils-0.163.orig/backends/aarch64_initreg.c
+++ elfutils-0.163/backends/aarch64_initreg.c
@@ -33,7 +33,7 @@
 #include "system.h"
 #include <assert.h>
 #ifdef __aarch64__
-# include <linux/uio.h>
+# include <sys/uio.h>
 # include <sys/user.h>
 # include <sys/ptrace.h>
 /* Deal with old glibc defining user_pt_regs instead of user_regs_struct.  */
@@ -82,7 +82,7 @@ aarch64_set_initial_registers_tid (pid_t
 
   Dwarf_Word dwarf_fregs[32];
   for (int r = 0; r < 32; r++)
-    dwarf_fregs[r] = fregs.vregs[r] & 0xFFFFFFFF;
+    dwarf_fregs[r] = (unsigned int)fregs.vregs[r] & 0xFFFFFFFF;
 
   if (! setfunc (64, 32, dwarf_fregs, arg))
     return false;
Index: elfutils-0.163/backends/arm_initreg.c
===================================================================
--- elfutils-0.163.orig/backends/arm_initreg.c
+++ elfutils-0.163/backends/arm_initreg.c
@@ -37,7 +37,7 @@
 #endif
 
 #ifdef __aarch64__
-# include <linux/uio.h>
+# include <sys/uio.h>
 # include <sys/user.h>
 # include <sys/ptrace.h>
 /* Deal with old glibc defining user_pt_regs instead of user_regs_struct.  */