Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.busybox.net/busybox.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMing Liu <peter.x.liu@external.atlascopco.com>2017-06-02 11:47:23 +0300
committerDenys Vlasenko <vda.linux@googlemail.com>2017-06-13 20:13:37 +0300
commit978307f8a19084ffb6e977ee28c731445e37dbbd (patch)
tree367ff8dd42c7bb7b4f9c562f079b4a3e8ccfc6c2
parent192dce4b84fb32346ebc5194de7daa5da3b8d1b4 (diff)
tar: add IF_FEATURE_* checks
A following linking error was observed: | ========== | archival/lib.a(tar.o): In function `tar_main': | archival/tar.c:1168: undefined reference to `unpack_Z_stream' | archival/tar.c:1168: undefined reference to `unpack_Z_stream' | ld: busybox_unstripped: hidden symbol `unpack_Z_stream' isn't defined | ld: final link failed: Bad value this happened with clang compiler, with the following configs: | CONFIG_TAR=y | # CONFIG_FEATURE_SEAMLESS_Z is not set which can be fixed by adding IF_FEATURE_* checks in. Signed-off-by: Ming Liu <peter.x.liu@external.atlascopco.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
-rw-r--r--archival/tar.c25
1 files changed, 15 insertions, 10 deletions
diff --git a/archival/tar.c b/archival/tar.c
index b70e00a8b..7598b71e3 100644
--- a/archival/tar.c
+++ b/archival/tar.c
@@ -1216,21 +1216,26 @@ int tar_main(int argc UNUSED_PARAM, char **argv)
USE_FOR_MMU(IF_DESKTOP(long long) int FAST_FUNC (*xformer)(transformer_state_t *xstate);)
USE_FOR_NOMMU(const char *xformer_prog;)
- if (opt & OPT_COMPRESS)
- USE_FOR_MMU(xformer = unpack_Z_stream;)
+ if (opt & OPT_COMPRESS) {
+ USE_FOR_MMU(IF_FEATURE_SEAMLESS_Z(xformer = unpack_Z_stream;))
USE_FOR_NOMMU(xformer_prog = "uncompress";)
- if (opt & OPT_GZIP)
- USE_FOR_MMU(xformer = unpack_gz_stream;)
+ }
+ if (opt & OPT_GZIP) {
+ USE_FOR_MMU(IF_FEATURE_SEAMLESS_GZ(xformer = unpack_gz_stream;))
USE_FOR_NOMMU(xformer_prog = "gunzip";)
- if (opt & OPT_BZIP2)
- USE_FOR_MMU(xformer = unpack_bz2_stream;)
+ }
+ if (opt & OPT_BZIP2) {
+ USE_FOR_MMU(IF_FEATURE_SEAMLESS_BZ2(xformer = unpack_bz2_stream;))
USE_FOR_NOMMU(xformer_prog = "bunzip2";)
- if (opt & OPT_LZMA)
- USE_FOR_MMU(xformer = unpack_lzma_stream;)
+ }
+ if (opt & OPT_LZMA) {
+ USE_FOR_MMU(IF_FEATURE_SEAMLESS_LZMA(xformer = unpack_lzma_stream;))
USE_FOR_NOMMU(xformer_prog = "unlzma";)
- if (opt & OPT_XZ)
- USE_FOR_MMU(xformer = unpack_xz_stream;)
+ }
+ if (opt & OPT_XZ) {
+ USE_FOR_MMU(IF_FEATURE_SEAMLESS_XZ(xformer = unpack_xz_stream;))
USE_FOR_NOMMU(xformer_prog = "unxz";)
+ }
fork_transformer_with_sig(tar_handle->src_fd, xformer, xformer_prog);
/* Can't lseek over pipes */