components/desktop/firefox/patches/firefox-34-lz4-restrict-keyword.patch
author Petr Sumbera <petr.sumbera@oracle.com>
Mon, 05 Sep 2016 05:00:46 -0700
branchs11u3-sru
changeset 7035 4c2f26e9d5ab
permissions -rw-r--r--
24361911 Upgrade Firefox to version 45.4.0 ESR 23033044 firefox needs to be built with "--with-intl-api" option 24708365 problem in FIREFOX/BROWSER 24708614 problem in FIREFOX/BROWSER

Correctly recognize the "restrict" keyword for the lz4.c file included in
Compression.cpp
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=57025

diff --git a/mfbt/lz4.c b/mfbt/lz4.c
--- a/mfbt/lz4.c
+++ b/mfbt/lz4.c
@@ -104,7 +104,7 @@
 /**************************************
  Compiler Options
 **************************************/
-#if defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L)   /* C99 */
+#if defined(__STDC_VERSION__) && !defined(__cplusplus) && (__STDC_VERSION__ >= 199901L)   /* C99 */
 /* "restrict" is a known keyword */
 #else
 #  define restrict /* Disable restrict */