From 5d2e8f06f4cf3ec0b57583b4efd75aeb3aed1912 Mon Sep 17 00:00:00 2001 From: Olivier Certner Date: Mon, 18 Jan 2021 13:37:10 +0100 Subject: [PATCH] Issue #1729 - Support building/linking against libc++ 9+ Including must never trigger inclusion of "mozalloc.h", because the first thing this one does is precisely to include . It is now the case that, in libc++ 9 and beyond, includes which then tries to include , which the STL wrapper intercepts, trying to load "mozalloc.h". Same problem happens with . Fix pulled from: https://bugzilla.mozilla.org/show_bug.cgi?id=1594027. --- config/gcc-stl-wrapper.template.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/config/gcc-stl-wrapper.template.h b/config/gcc-stl-wrapper.template.h index 9b4a61d246..e7b01482c2 100644 --- a/config/gcc-stl-wrapper.template.h +++ b/config/gcc-stl-wrapper.template.h @@ -32,6 +32,14 @@ # define moz_dont_include_mozalloc_for_cstdlib #endif +#ifndef moz_dont_include_mozalloc_for_type_traits +# define moz_dont_include_mozalloc_for_type_traits +#endif + +#ifndef moz_dont_include_mozalloc_for_limits +# define moz_dont_include_mozalloc_for_limits +#endif + // Include mozalloc after the STL header and all other headers it includes // have been preprocessed. #if !defined(MOZ_INCLUDE_MOZALLOC_H) && \