Fix build with gcc<4.5.

For example, fix build on DragonFly 3.0.1.
See https://bugzilla.mozilla.org/show_bug.cgi?id=621446
This commit is contained in:
ryoon 2012-03-22 21:14:24 +00:00
parent a8078047b2
commit 0fb9a28a9d
2 changed files with 26 additions and 1 deletions

View file

@ -1,4 +1,4 @@
$NetBSD: distinfo,v 1.65 2012/03/21 20:10:11 ryoon Exp $
$NetBSD: distinfo,v 1.66 2012/03/22 21:14:24 ryoon Exp $
SHA1 (firefox-11.0.source.tar.bz2) = 0b05f91b81803010502cf89f54c3d0187fb63d7e
RMD160 (firefox-11.0.source.tar.bz2) = 13b7c7327063625904d00b58a6d6f15c04918e92
@ -76,6 +76,7 @@ SHA1 (patch-ml) = ffec4dcae4a4e3683eebfc3e8aaafe15fa27443e
SHA1 (patch-mm) = 9b99265bdcb39b917171ed13861afb3a6cd03eb6
SHA1 (patch-mn) = a59f31b58547657b96a45a2753aab93866940203
SHA1 (patch-mp) = 18d2490b6bcd4f017cbf2734a920c3830bfe8856
SHA1 (patch-netwerk_protocol_http_HttpChannelParent.cpp) = d6b370377d5c397eda9b79bf2093066e9af9a35b
SHA1 (patch-nsprpub_pr_include_md__dragonfly.cfg) = 9888fa5070d2201a8912be33a32ae32f1d26f8ce
SHA1 (patch-nsprpub_pr_include_md__pth.h) = 4bfa7e66ac4017169aca87b2643218d1b1bcddcf
SHA1 (patch-nsprpub_pr_include_md_prosdep.h) = ffbe93d98a2d0c6e9587bdf2b9ccfc81a342c34e

View file

@ -0,0 +1,24 @@
$NetBSD: patch-netwerk_protocol_http_HttpChannelParent.cpp,v 1.1 2012/03/22 21:14:24 ryoon Exp $
* Fix build with gcc<4.5, for example, DragonFly 3.0.1.
See https://bugzilla.mozilla.org/show_bug.cgi?id=621446
--- netwerk/protocol/http/HttpChannelParent.cpp.orig 2012-03-13 01:37:10.000000000 +0000
+++ netwerk/protocol/http/HttpChannelParent.cpp
@@ -333,10 +333,15 @@ HttpChannelParent::RecvUpdateAssociatedC
return true;
}
-// Bug 621446 investigation, we don't want conditional PR_Aborts bellow to be
+// Bug 621446 investigation, we don't want conditional PR_Aborts below to be
// merged to a single address.
#pragma warning(disable : 4068)
+// Compiling with a version of GCC <= 4.4 fails with an internal compiler
+// error.
+#if !defined(__GNUC__) || \
+ (__GNUC__ >= 5) || (__GNUC__ == 4 && __GNUC_MINOR__ >= 5)
#pragma GCC optimize ("O0")
+#endif
bool
HttpChannelParent::RecvRedirect2Verify(const nsresult& result,