void-packages/srcpkgs/radare2/patches/musl-debug.patch
Johannes 036e18e859 radare: update to 4.1.1.
git is used to fetch a specific tag of tree-sitter
2020-01-12 19:24:16 +01:00

42 lines
1,001 B
Diff

backported from master
From 0e34303648430dfcb3f0b9947233d897883e1484 Mon Sep 17 00:00:00 2001
From: pancake <pancake@nopcode.org>
Date: Fri, 10 Jan 2020 03:50:30 +0100
Subject: [PATCH] Third fix attepmt for musl builds
--- libr/debug/p/native/linux/linux_debug.c 2019-12-20 13:22:09.000000000 +0100
+++ libr/debug/p/native/linux/linux_debug.c 2020-01-11 21:23:23.359825810 +0100
@@ -18,6 +18,12 @@
#include <unistd.h>
#include <elf.h>
+#ifdef __GLIBC__
+#define HAVE_YMM 1
+#else
+#define HAVE_YMM 0
+#endif
+
char *linux_reg_profile (RDebug *dbg) {
#if __arm__
#include "reg/linux-arm.h"
@@ -40,7 +46,9 @@
#endif
} else {
#include "reg/linux-x64.h"
-#include <bits/sigcontext.h>
+#if HAVE_YMM
+# include <bits/sigcontext.h>
+#endif
}
#elif __powerpc__
if (dbg->bits & R_SYS_BITS_32) {
@@ -1043,7 +1051,7 @@
break;
case R_REG_TYPE_YMM:
{
-#if __x86_64__
+#if HAVE_YMM && __x86_64__
ut32 ymm_space[128]; // full ymm registers
struct _xstate xstate;
struct iovec iov;