From: LLVM Packaging Team Date: Sun, 20 Nov 2022 05:54:23 +0000 (+0000) Subject: unwind-chain-inclusion X-Git-Tag: archive/raspbian/1%16.0.6-15+rpi1~3^2~90 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=cd6b61ca8e7f2ab848d84259484e9f0bd53bbf5c;p=llvm-toolchain-16.git unwind-chain-inclusion # Without this patch, the first local include of unwind.h might, with the # __has_include_next, try to include the one from the system. # It might be /usr/include/clang/3.4/include/unwind.h # Because of the #ifndef __CLANG_UNWIND_H, it might never include any declaration # from the system. Gbp-Pq: Name unwind-chain-inclusion.diff --- diff --git a/clang/lib/Headers/unwind.h b/clang/lib/Headers/unwind.h index 971a62da0d..a4c914a6ae 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() /* 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 #ifdef __cplusplus @@ -326,6 +326,7 @@ _Unwind_Ptr _Unwind_GetTextRelBase(struct _Unwind_Context *); } #endif +#endif /* __CLANG_UNWIND_H */ + #endif -#endif /* __CLANG_UNWIND_H */