diff options
author | Lasse Collin <lasse.collin@tukaani.org> | 2022-11-14 16:00:52 +0200 |
---|---|---|
committer | Lasse Collin <lasse.collin@tukaani.org> | 2022-11-14 16:00:52 +0200 |
commit | eb0f1450ad9f23dac03050d9c8375980240aee21 (patch) | |
tree | 2ccb523dc0277999d3629bad18e0c2e819d33b64 /src/liblzma/lz/lz_encoder.c | |
parent | Translations: Update the Romanian translation. (diff) | |
download | xz-eb0f1450ad9f23dac03050d9c8375980240aee21.tar.xz |
liblzma: Use __attribute__((__constructor__)) if available.
This uses it for CRC table initializations when using --disable-small.
It avoids mythread_once() overhead. It also means that then
--disable-small --disable-threads is thread-safe if this attribute
is supported.
Diffstat (limited to 'src/liblzma/lz/lz_encoder.c')
-rw-r--r-- | src/liblzma/lz/lz_encoder.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/liblzma/lz/lz_encoder.c b/src/liblzma/lz/lz_encoder.c index 890d1bc4..2dad7e5f 100644 --- a/src/liblzma/lz/lz_encoder.c +++ b/src/liblzma/lz/lz_encoder.c @@ -543,7 +543,7 @@ lzma_lz_encoder_init(lzma_next_coder *next, const lzma_allocator *allocator, const lzma_allocator *allocator, const void *options, lzma_lz_options *lz_options)) { -#ifdef HAVE_SMALL +#if defined(HAVE_SMALL) && !defined(HAVE_FUNC_ATTRIBUTE_CONSTRUCTOR) // We need that the CRC32 table has been initialized. lzma_crc32_init(); #endif |