]> wimlib.net Git - wimlib/blobdiff - src/decompress.c
mount_image.c: add fallback definitions of RENAME_* constants
[wimlib] / src / decompress.c
index f255ea92fd503906cd8a6d73480cde25b8c3adeb..c2ab5b8732386e282e2cf3bf4931a12f63412e5d 100644 (file)
@@ -19,7 +19,7 @@
  * details.
  *
  * You should have received a copy of the GNU Lesser General Public License
- * along with this file; if not, see http://www.gnu.org/licenses/.
+ * along with this file; if not, see https://www.gnu.org/licenses/.
  */
 
 #ifdef HAVE_CONFIG_H
@@ -56,6 +56,11 @@ wimlib_create_decompressor(enum wimlib_compression_type ctype,
                           struct wimlib_decompressor **dec_ret)
 {
        struct wimlib_decompressor *dec;
+       int ret;
+
+       ret = wimlib_global_init(0);
+       if (ret)
+               return ret;
 
        if (!decompressor_ctype_valid(ctype))
                return WIMLIB_ERR_INVALID_COMPRESSION_TYPE;
@@ -73,8 +78,6 @@ wimlib_create_decompressor(enum wimlib_compression_type ctype,
        dec->max_block_size = max_block_size;
        dec->private = NULL;
        if (dec->ops->create_decompressor) {
-               int ret;
-
                ret = dec->ops->create_decompressor(max_block_size,
                                                    &dec->private);
                if (ret) {