Skip to content

Commit

Permalink
Fix compile error
Browse files Browse the repository at this point in the history
  • Loading branch information
licy183 committed Oct 27, 2023
1 parent b271e40 commit a6275a2
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions patches/0008-workaround-for-libcxx.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
--- a/gcc/ginclude/float.h
+++ b/gcc/ginclude/float.h
@@ -25,6 +25,12 @@
* ISO C Standard: 5.2.4.2.2 Characteristics of floating types <float.h>
*/

+#ifdef _LIBCPP_CFLOAT
+#if __has_include_next(<float.h>)
+# include_next <float.h>
+#endif
+#endif
+
#ifndef _FLOAT_H___
#define _FLOAT_H___
--- a/gcc/ginclude/stddef.h
+++ b/gcc/ginclude/stddef.h
@@ -24,6 +24,13 @@
/*
* ISO C Standard: 7.17 Common definitions <stddef.h>
*/
+
+#ifdef _LIBCPP_CSTDDEF
+#if __has_include_next(<stddef.h>)
+# include_next <stddef.h>
+#endif
+#endif
+
#if (!defined(_STDDEF_H) && !defined(_STDDEF_H_) && !defined(_ANSI_STDDEF_H) \
&& !defined(__STDDEF_H__)) \
|| defined(__need_wchar_t) || defined(__need_size_t) \

0 comments on commit a6275a2

Please sign in to comment.