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 3872267 commit 67abfb5
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions patches/0004-workaround-for-libcxx.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
--- 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,11 @@
/*
* 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 67abfb5

Please sign in to comment.