|author||Nick Terrell <email@example.com>||2020-09-14 12:54:12 -0700|
|committer||Nick Terrell <firstname.lastname@example.org>||2021-11-08 16:55:26 -0800|
lib: zstd: Add decompress_sources.h for decompress_unzstd
Adds decompress_sources.h which includes every .c file necessary for zstd decompression. This is used in decompress_unzstd.c so the internal structure of the library isn't exposed. This allows us to upgrade the zstd library version without modifying any callers. Instead we just need to update decompress_sources.h. Signed-off-by: Nick Terrell <email@example.com> Tested By: Paul Jones <firstname.lastname@example.org> Tested-by: Oleksandr Natalenko <email@example.com> Tested-by: Sedat Dilek <firstname.lastname@example.org> # LLVM/Clang v13.0.0 on x86-64 Tested-by: Jean-Denis Girard <email@example.com>
Diffstat (limited to 'lib')
2 files changed, 24 insertions, 5 deletions
diff --git a/lib/decompress_unzstd.c b/lib/decompress_unzstd.c
index c076d6f05064..a512b99ae16a 100644
@@ -68,11 +68,7 @@
# define UNZSTD_PREBOOT
# include "xxhash.c"
-# include "zstd/entropy_common.c"
-# include "zstd/fse_decompress.c"
-# include "zstd/huf_decompress.c"
-# include "zstd/zstd_common.c"
-# include "zstd/decompress.c"
+# include "zstd/decompress_sources.h"
diff --git a/lib/zstd/decompress_sources.h b/lib/zstd/decompress_sources.h
new file mode 100644
@@ -0,0 +1,23 @@
+/* SPDX-License-Identifier: GPL-2.0+ OR BSD-3-Clause */
+ * Copyright (c) Facebook, Inc.
+ * All rights reserved.
+ * This source code is licensed under both the BSD-style license (found in the
+ * LICENSE file in the root directory of this source tree) and the GPLv2 (found
+ * in the COPYING file in the root directory of this source tree).
+ * You may select, at your option, one of the above-listed licenses.
+ * This file includes every .c file needed for decompression.
+ * It is used by lib/decompress_unzstd.c to include the decompression
+ * source into the translation-unit, so it can be used for kernel
+ * decompression.