diff options
author | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2014-10-08 12:01:23 -0500 |
---|---|---|
committer | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2014-10-08 12:01:23 -0500 |
commit | 58c3aed2bb340467aa9734a9141ebe1d89e4074b (patch) | |
tree | 03b3ade9faf9003f54758ad1ba1c6c1427b1c84c /tdeio | |
parent | a44c9249300c96da86fa79cae17bd88789e75399 (diff) | |
download | tdelibs-58c3aed2bb340467aa9734a9141ebe1d89e4074b.tar.gz tdelibs-58c3aed2bb340467aa9734a9141ebe1d89e4074b.zip |
Do not use magic_version function if magic version support not available
This relates to Bug 656
Diffstat (limited to 'tdeio')
-rw-r--r-- | tdeio/tdeio/kmimemagic.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/tdeio/tdeio/kmimemagic.cpp b/tdeio/tdeio/kmimemagic.cpp index dcc15fafe..41c69dd3a 100644 --- a/tdeio/tdeio/kmimemagic.cpp +++ b/tdeio/tdeio/kmimemagic.cpp @@ -254,7 +254,11 @@ KMimeMagic::~KMimeMagic() { bool KMimeMagic::mergeConfig(const TQString & _configfile) { conf->databases.append(_configfile); TQString merged_databases = conf->databases.join(":"); +#ifdef MAGIC_VERSION int magicvers = magic_version(); +#else // MAGIC_VERSION + int magicvers = 0; +#endif // MAGIC_VERSION if ((magicvers < 512) || (magicvers >= 518)) { if (magic_load(conf->magic, merged_databases.latin1()) == 0) { return true; |