00-future-2024-04-11-gnu-include-next.patch 736 B

1234567891011121314151617181920212223242526
  1. diff --git a/include/stddef.h b/include/stddef.h
  2. index 470b540..1583e78 100644
  3. --- a/include/stddef.h
  4. +++ b/include/stddef.h
  5. @@ -26,6 +26,10 @@ Types:
  6. #include <__config>
  7. +#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
  8. +# pragma GCC system_header
  9. +#endif
  10. +
  11. // Note: This include is outside of header guards because we sometimes get included multiple times
  12. // with different defines and the underlying <stddef.h> will know how to deal with that.
  13. #include_next <stddef.h>
  14. @@ -33,10 +37,6 @@ Types:
  15. #ifndef _LIBCPP_STDDEF_H
  16. # define _LIBCPP_STDDEF_H
  17. -# if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
  18. -# pragma GCC system_header
  19. -# endif
  20. -
  21. # ifdef __cplusplus
  22. typedef decltype(nullptr) nullptr_t;
  23. # endif