Skip to content

Commit 2479b52

Browse files
committed
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 protected]> Tested By: Paul Jones <[email protected]> Tested-by: Oleksandr Natalenko <[email protected]> Tested-by: Sedat Dilek <[email protected]> # LLVM/Clang v13.0.0 on x86-64 Tested-by: Jean-Denis Girard <[email protected]>
1 parent cf30f6a commit 2479b52

File tree

2 files changed

+24
-5
lines changed

2 files changed

+24
-5
lines changed

lib/decompress_unzstd.c

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -68,11 +68,7 @@
6868
#ifdef STATIC
6969
# define UNZSTD_PREBOOT
7070
# include "xxhash.c"
71-
# include "zstd/entropy_common.c"
72-
# include "zstd/fse_decompress.c"
73-
# include "zstd/huf_decompress.c"
74-
# include "zstd/zstd_common.c"
75-
# include "zstd/decompress.c"
71+
# include "zstd/decompress_sources.h"
7672
#endif
7773

7874
#include <linux/decompress/mm.h>

lib/zstd/decompress_sources.h

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
/* SPDX-License-Identifier: GPL-2.0+ OR BSD-3-Clause */
2+
/*
3+
* Copyright (c) Facebook, Inc.
4+
* All rights reserved.
5+
*
6+
* This source code is licensed under both the BSD-style license (found in the
7+
* LICENSE file in the root directory of this source tree) and the GPLv2 (found
8+
* in the COPYING file in the root directory of this source tree).
9+
* You may select, at your option, one of the above-listed licenses.
10+
*/
11+
12+
/*
13+
* This file includes every .c file needed for decompression.
14+
* It is used by lib/decompress_unzstd.c to include the decompression
15+
* source into the translation-unit, so it can be used for kernel
16+
* decompression.
17+
*/
18+
19+
#include "entropy_common.c"
20+
#include "fse_decompress.c"
21+
#include "huf_decompress.c"
22+
#include "zstd_common.c"
23+
#include "decompress.c"

0 commit comments

Comments
 (0)