unwind-chain-inclusion
authorLLVM Packaging Team <pkg-llvm-team@lists.alioth.debian.org>
Wed, 14 Jun 2017 17:06:20 +0000 (18:06 +0100)
committerSylvestre Ledru <sylvestre@debian.org>
Wed, 14 Jun 2017 17:06:20 +0000 (18:06 +0100)
# 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

clang/lib/Headers/unwind.h

index 4f74a3478740e9fef0b9432737393c9190ba46a1..925b710e9bf5767f17a5158b0fcfee637050baf2 100644 (file)
@@ -23,9 +23,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,
@@ -53,6 +50,9 @@
 # endif
 #else
 
+#ifndef __CLANG_UNWIND_H
+#define __CLANG_UNWIND_H
+
 #include <stdint.h>
 
 #ifdef __cplusplus
@@ -294,6 +294,7 @@ _Unwind_Ptr _Unwind_GetTextRelBase(struct _Unwind_Context *);
 }
 #endif
 
+#endif /* __CLANG_UNWIND_H */
+
 #endif
 
-#endif /* __CLANG_UNWIND_H */