data->threads = 1;
return (ARCHIVE_WARN);
}
- if (data->threads == 0)
+ if (data->threads == 0) {
+#ifdef HAVE_LZMA_STREAM_ENCODER_MT
data->threads = lzma_cputhreads();
+#else
+ data->threads = 1;
+#endif
+ }
return (ARCHIVE_OK);
}
value);
return (ARCHIVE_FAILED);
}
- if (xar->opt_threads == 0)
+ if (xar->opt_threads == 0) {
+#ifdef HAVE_LZMA_STREAM_ENCODER_MT
xar->opt_threads = lzma_cputhreads();
+#else
+ xar->opt_threads = 1;
+#endif
+ }
}
/* Note: The "warn" return is just to inform the options
lzma_mt mt_options;
#endif
+ (void)threads; /* UNUSED (if multi-threaded LZMA library not avail) */
+
if (lastrm->valid)
compression_end(a, lastrm);
strm = calloc(1, sizeof(*strm) + sizeof(*lzmafilters) * 2);