musllvm/patches/llvm/0022-clang-fix-unwind-chain-inclusion.patch
cowmonk 6110995cfb Initial stub of a Makefile and patches for LLVM
Nothing much, but getting some patches from chimera linux that should
work.
2025-10-25 16:23:17 -07:00

46 lines
1.2 KiB
Diff

From 5b9530079f3623af96d47938adec11eefde65974 Mon Sep 17 00:00:00 2001
From: q66 <q66@chimera-linux.org>
Date: Tue, 2 May 2023 16:25:59 +0200
Subject: [PATCH 22/29] clang: fix unwind chain inclusion
This fixes the compiler complaining about the __has_include_next.
---
clang/lib/Headers/unwind.h | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/clang/lib/Headers/unwind.h b/clang/lib/Headers/unwind.h
index 33e1792cd..a32e18cda 100644
--- a/clang/lib/Headers/unwind.h
+++ b/clang/lib/Headers/unwind.h
@@ -9,9 +9,6 @@
/* See "Data Definitions for libgcc_s" in the Linux Standard Base.*/
-#ifndef __CLANG_UNWIND_H
-#define __CLANG_UNWIND_H
-
#if defined(__APPLE__) && __has_include_next(<unwind.h>)
/* Darwin (from 11.x on) provide an unwind.h. If that's available,
* use it. libunwind wraps some of its definitions in #ifdef _GNU_SOURCE,
@@ -39,6 +36,9 @@
# endif
#else
+#ifndef __CLANG_UNWIND_H
+#define __CLANG_UNWIND_H
+
#include <stdint.h>
#ifdef __cplusplus
@@ -327,6 +327,7 @@ _Unwind_Ptr _Unwind_GetTextRelBase(struct _Unwind_Context *);
}
#endif
+#endif /* __CLANG_UNWIND_H */
+
#endif
-#endif /* __CLANG_UNWIND_H */
--
2.49.0