Blob Blame History Raw
From 39e14aa3c638f36173f2a8747f524b9273857bee Mon Sep 17 00:00:00 2001
From: Mat Booth <mat.booth@redhat.com>
Date: Tue, 28 Jan 2020 15:57:33 +0000
Subject: [PATCH] Bug 559637 - SWT fails to build with GCC 10

Fixes build failure caused by global variable with multiple definitions
by declaring it with "extern" in the header

Change-Id: Id34c07cddde21baa4c00e97eb4a457855c37906c
Signed-off-by: Mat Booth <mat.booth@redhat.com>
---

diff --git a/eclipse.platform.swt/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os_custom.h b/eclipse.platform.swt/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os_custom.h
index e56bd8f..8389585 100644
--- "a/eclipse.platform.swt/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os_custom.h"
+++ "b/eclipse.platform.swt/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os_custom.h"
@@ -105,7 +105,7 @@
 glong g_utf8_offset_to_utf16_offset(const gchar*, glong);
 
 // Cached JVM pointer: see bug 521487.
-JavaVM *cached_jvm;
+extern JavaVM *cached_jvm;
 
 #define SWT_TYPE_FIXED (swt_fixed_get_type ())
 #define SWT_FIXED(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), SWT_TYPE_FIXED, SwtFixed))