From 195534385764902751cd45c3748cef885aeaa21c Mon Sep 17 00:00:00 2001
From: Přemysl Janouch
Date: Wed, 2 Oct 2013 02:11:57 +0200
Subject: Add a workaround for GLib < 2.33.1
I wanted to have it working in Wheezy and this was standing in the way,
so I went for the quick fix that I'd made available to myself.
---
src/stardict.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/src/stardict.c b/src/stardict.c
index e54755d..d81848c 100644
--- a/src/stardict.c
+++ b/src/stardict.c
@@ -585,6 +585,12 @@ load_dict (StardictDict *sd, const gchar *filename, gboolean gzipped,
if (!fis)
goto cannot_open;
+ // As a simple workaround for GLib < 2.33.1 and the lack of support for
+ // the GSeekable interface in GDataInputStream, disable dictzip.
+ //
+ // http://lists.gnu.org/archive/html/qemu-devel/2013-06/msg04690.html
+ if (!glib_check_version (2, 33, 1))
+ {
// Try opening it as a dictzip file first
DictzipInputStream *dzis =
dictzip_input_stream_new (G_INPUT_STREAM (fis), NULL);
@@ -598,6 +604,7 @@ load_dict (StardictDict *sd, const gchar *filename, gboolean gzipped,
// If unsuccessful, just read it all, as it is, into memory
if (!g_seekable_seek (G_SEEKABLE (fis), 0, G_SEEK_SET, NULL, error))
goto done;
+ }
GByteArray *ba = g_byte_array_new ();
GZlibDecompressor *zd
--
cgit v1.2.3-70-g09d2