# --- T2-COPYRIGHT-BEGIN --- # t2/package/*/thunderbird/hotfix-x11-success-mozpkix.patch # Copyright (C) 2026 The T2 SDE Project # SPDX-License-Identifier: GPL-2.0 or patched project license # --- T2-COPYRIGHT-END --- Fix build of toolkit/xre with X11: "Success" macro vs. mozilla::pkix::Result Thunderbird-only includes nsNSSComponent.h (-> mozpkix/Result.h) from nsXREDirProvider.cpp, which in the unified toolkit/xre build comes after the GDK/X11 error handlers that pull in with #define Success 0. TelemetryHistogramEnums.h pops the macro back, so the mozpkix enum breaks: objs/dist/include/mozilla/TelemetryHistogramEnums.h:1167:2: error: expected identifier before numeric constant objs/dist/include/nss/mozpkix/Result.h:88:20: note: in expansion of macro 'Success' Temporarily undefine Success around the NSS includes. Signed-off-by: René Rebe --- a/toolkit/xre/nsXREDirProvider.cpp +++ b/toolkit/xre/nsXREDirProvider.cpp @@ -61,8 +61,13 @@ # ifdef XP_MACOSX # include "MacApplicationDelegate.h" # endif +// X11 defines "Success", which breaks mozilla::pkix::Result::Success in +// unified builds where the GDK/X11 error handlers are included before us. +# pragma push_macro("Success") +# undef Success # include "ScopedNSSTypes.h" # include "nsNSSComponent.h" +# pragma pop_macro("Success") #endif #include