openwrt/package/libs/elfutils/patches/006-Fix-build-on-aarch64-musl.patch
Ryan Keane 4166aaf98a
elfutils: Update to 0.192
Add a patch still under review to fix some errors.

Refresh patch:
- 003-libintl-compatibility.patch
- 005-build_only_libs.patch
- 006-Fix-build-on-aarch64-musl.patch

Add patch:
- 102-fix-potential-deref-of-null-error.patch

Release notes are in the link below.

Link: https://inbox.sourceware.org/elfutils-devel/CAJDtP-T3+gXqHWp3T0mejWWbPr0_1tHetEXwfB67-o+zz7ShiA@mail.gmail.com/T/#u
Signed-off-by: Ryan Keane <the.ra2.ifv@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/16886
Signed-off-by: Robert Marko <robimarko@gmail.com>
(cherry picked from commit f5132df69d)
Link: https://github.com/openwrt/openwrt/pull/17097
Signed-off-by: Petr Štetiar <ynezz@true.cz>
2024-11-28 18:47:33 +00:00

56 lines
1.5 KiB
Diff

From 578f370c7e7a9f056aefa062b34590b0aa13bce5 Mon Sep 17 00:00:00 2001
From: Hongxu Jia <hongxu.jia@windriver.com>
Date: Tue, 15 Aug 2017 17:27:30 +0800
Subject: [PATCH] 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>
Rebase to 0.170
Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
---
backends/aarch64_initreg.c | 4 ++--
backends/arm_initreg.c | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
--- a/backends/aarch64_initreg.c
+++ b/backends/aarch64_initreg.c
@@ -33,7 +33,7 @@
#include "system.h"
#include <assert.h>
#if defined(__aarch64__) && defined(__linux__)
-# include <linux/uio.h>
+# include <sys/uio.h>
# include <sys/user.h>
# include <sys/ptrace.h>
# include <asm/ptrace.h>
@@ -94,7 +94,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;
--- a/backends/arm_initreg.c
+++ b/backends/arm_initreg.c
@@ -38,7 +38,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. */