diff options
-rw-r--r-- | features/org.eclipse.equinox.executable.feature/library/gtk/eclipseGtkInit.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/features/org.eclipse.equinox.executable.feature/library/gtk/eclipseGtkInit.c b/features/org.eclipse.equinox.executable.feature/library/gtk/eclipseGtkInit.c index 996c9ef75..6a5d5e29b 100644 --- a/features/org.eclipse.equinox.executable.feature/library/gtk/eclipseGtkInit.c +++ b/features/org.eclipse.equinox.executable.feature/library/gtk/eclipseGtkInit.c @@ -106,6 +106,20 @@ int loadGtk() { if (gtk3 == NULL || strcmp(gtk3,"1") == 0) { gdkLib = dlopen(GDK3_LIB, DLFLAGS); gtkLib = dlopen(GTK3_LIB, DLFLAGS); + if (gtkLib != NULL) { + const char * (*func)(int, int, int); + dlerror(); + *(void**) (&func) = dlsym(gtkLib, "gtk_check_version"); + if (dlerror() == NULL && func) { + const char *check = (*func)(3, 9, 0); + if (check == NULL) { + dlclose(gdkLib); + dlclose(gtkLib); + gdkLib = gtkLib = NULL; + setenv("SWT_GTK3","0",1); + } + } + } } if (!gtkLib || !gdkLib) { gdkLib = dlopen(GDK_LIB, DLFLAGS); |