From 8e4ec794836bc1701d8c9bd5e347b8ce8cc5bbb4 Mon Sep 17 00:00:00 2001 From: Lasse Collin Date: Mon, 12 Feb 2024 17:09:10 +0200 Subject: liblzma: Fix compilation of price_tablegen.c. It is built and run only manually so this didn't matter unless one wanted to regenerate the price_table.c. --- src/liblzma/rangecoder/price_tablegen.c | 5 +++++ src/liblzma/rangecoder/range_common.h | 5 ++++- 2 files changed, 9 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/liblzma/rangecoder/price_tablegen.c b/src/liblzma/rangecoder/price_tablegen.c index 94a3b1f1..3ab587eb 100644 --- a/src/liblzma/rangecoder/price_tablegen.c +++ b/src/liblzma/rangecoder/price_tablegen.c @@ -14,6 +14,11 @@ #include #include + +// Make it compile without common.h. +#define BUILDING_PRICE_TABLEGEN +#define lzma_attr_visibility_hidden + #include "range_common.h" #include "price.h" diff --git a/src/liblzma/rangecoder/range_common.h b/src/liblzma/rangecoder/range_common.h index b72b7d46..bcfd966e 100644 --- a/src/liblzma/rangecoder/range_common.h +++ b/src/liblzma/rangecoder/range_common.h @@ -13,7 +13,10 @@ #ifndef LZMA_RANGE_COMMON_H #define LZMA_RANGE_COMMON_H -#include "common.h" +// Skip common.h if building price_tablegen.c. +#ifndef BUILDING_PRICE_TABLEGEN +# include "common.h" +#endif /////////////// -- cgit v1.2.3