Submitted by:            DJ Lucas <dj_AT_linuxfromscratch_DOT_org>
Date:                    2016-06-30
Initial Package Version: 45.1.1
Upstream Status:         Submitted
Origin:                  https://bugzilla.mozilla.org/show_bug.cgi?id=1245783
                         https://bugzilla.mozilla.org/show_bug.cgi?id=1232696
                         https://build.opensuse.org/package/view_file/mozilla:Factory/MozillaThunderbird/mozilla-flexible-array-member-in-union.patch
Comment:                 Fixes build errors with GCC-6.1.

diff -Naurp thunderbird-45.1.1-orig/mozilla/gfx/harfbuzz/src/hb-font-private.hh thunderbird-45.1.1/mozilla/gfx/harfbuzz/src/hb-font-private.hh
--- thunderbird-45.1.1-orig/mozilla/gfx/harfbuzz/src/hb-font-private.hh	2016-06-29 18:00:30.533276565 -0500
+++ thunderbird-45.1.1/mozilla/gfx/harfbuzz/src/hb-font-private.hh	2016-06-29 18:00:41.758334043 -0500
@@ -80,7 +80,7 @@ struct hb_font_funcs_t {
       HB_FONT_FUNCS_IMPLEMENT_CALLBACKS
 #undef HB_FONT_FUNC_IMPLEMENT
     } f;
-    void (*array[]) (void);
+    void (*array[VAR]) (void);
   } get;
 };
 
diff -Naurp thunderbird-45.1.1-orig/mozilla/gfx/harfbuzz/src/hb-private.hh thunderbird-45.1.1/mozilla/gfx/harfbuzz/src/hb-private.hh
--- thunderbird-45.1.1-orig/mozilla/gfx/harfbuzz/src/hb-private.hh	2016-06-29 18:00:30.532276559 -0500
+++ thunderbird-45.1.1/mozilla/gfx/harfbuzz/src/hb-private.hh	2016-06-29 18:00:41.759334048 -0500
@@ -1010,5 +1010,7 @@ hb_options (void)
   return _hb_options.opts;
 }
 
+/* Size signifying variable-sized array */
+#define VAR 1
 
 #endif /* HB_PRIVATE_HH */
diff -Naurp thunderbird-45.1.1-orig/mozilla/nsprpub/config/make-system-wrappers.pl thunderbird-45.1.1/mozilla/nsprpub/config/make-system-wrappers.pl
--- thunderbird-45.1.1-orig/mozilla/nsprpub/config/make-system-wrappers.pl	2016-06-29 18:00:26.904257982 -0500
+++ thunderbird-45.1.1/mozilla/nsprpub/config/make-system-wrappers.pl	2016-06-29 18:01:09.738477318 -0500
@@ -19,7 +19,9 @@ while (<STDIN>) {
     open OUT, ">$output_dir/$_";
     print OUT "#pragma GCC system_header\n";  # suppress include_next warning
     print OUT "#pragma GCC visibility push(default)\n";
+    print OUT "#define _GLIBCXX_INCLUDE_NEXT_C_HEADERS\n";
     print OUT "#include_next \<$_\>\n";
+    print OUT "#undef _GLIBCXX_INCLUDE_NEXT_C_HEADERS\n";
     print OUT "#pragma GCC visibility pop\n";
     close OUT;
 }
