From 3ea2609ced69aab75c8c701ac80bde61cb5d3606 Mon Sep 17 00:00:00 2001 From: Witold Filipczyk Date: Mon, 13 Dec 2021 16:22:50 +0100 Subject: [PATCH] [lzma] Compilation fix --- meson.build | 5 +++++ src/encoding/lzma.c | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/meson.build b/meson.build index dd684083..6ca13aed 100644 --- a/meson.build +++ b/meson.build @@ -235,6 +235,11 @@ if conf_data.get('CONFIG_ZSTD') deps += zstddeps endif +if conf_data.get('CONFIG_LZMA') + lzmadeps = dependency('liblzma') + deps += lzmadeps +endif + if conf_data.get('CONFIG_IDN') idndeps = dependency('libidn') deps += idndeps diff --git a/src/encoding/lzma.c b/src/encoding/lzma.c index a7a44238..bc35f854 100644 --- a/src/encoding/lzma.c +++ b/src/encoding/lzma.c @@ -60,7 +60,7 @@ lzma_open(struct stream_encoded *stream, int fd) } static int -lzma_read(struct stream_encoded *stream, char *buf, int len) +lzma_read(struct stream_encoded *stream, unsigned char *buf, int len) { struct lzma_enc_data *data = (struct lzma_enc_data *) stream->data; int err = 0; @@ -107,7 +107,7 @@ lzma_read(struct stream_encoded *stream, char *buf, int len) } static char * -lzma_decode_buffer(struct stream_encoded *st, char *data, int len, int *new_len) +lzma_decode_buffer(struct stream_encoded *st, unsigned char *data, int len, int *new_len) { struct lzma_enc_data *enc_data = (struct lzma_enc_data *) st->data; lzma_stream *stream = &enc_data->flzma_stream;