brotli: gcc2 build fix

This commit is contained in:
Jerome Duval
2020-10-20 16:56:57 +02:00
parent b2b33e0259
commit 0cbfeb6fa2
2 changed files with 27 additions and 2 deletions

View File

@@ -7,7 +7,7 @@ methods. It is similar in speed with deflate but offers more dense compression."
HOMEPAGE="https://github.com/google/brotli"
COPYRIGHT="2009, 2010, 2013-2018 Brotli Authors"
LICENSE="MIT"
REVISION="1"
REVISION="2"
SOURCE_URI="https://github.com/google/brotli/archive/v$portVersion.tar.gz"
# Testdata missing in Tarball, see https://github.com/google/brotli/issues/850
# For tests 1/ use the git URL

View File

@@ -1,4 +1,4 @@
From 649862e0942420cbbf58d799f2df247f401a3f0a Mon Sep 17 00:00:00 2001
From 6c76022bdd932a046d38bf4e4936d02a95d48466 Mon Sep 17 00:00:00 2001
From: Jerome Duval <jerome.duval@gmail.com>
Date: Mon, 19 Oct 2020 17:31:53 +0200
Subject: fix pkgconfig scripts regression
@@ -42,3 +42,28 @@ index 4dd0811..2098afe 100644
--
2.28.0
From 7741f18ea2f7baac29f67d421ce9dfb88be27a22 Mon Sep 17 00:00:00 2001
From: Jerome Duval <jerome.duval@gmail.com>
Date: Tue, 20 Oct 2020 16:56:04 +0200
Subject: c89 fix
diff --git a/c/tools/brotli.c b/c/tools/brotli.c
index 7c678d3..c4efc43 100644
--- a/c/tools/brotli.c
+++ b/c/tools/brotli.c
@@ -889,8 +889,9 @@ static BROTLI_BOOL DecompressFile(Context* context, BrotliDecoderState* s) {
} else if (result == BROTLI_DECODER_RESULT_NEEDS_MORE_OUTPUT) {
if (!ProvideOutput(context)) return BROTLI_FALSE;
} else if (result == BROTLI_DECODER_RESULT_SUCCESS) {
+ int has_more_input;
if (!FlushOutput(context)) return BROTLI_FALSE;
- int has_more_input =
+ has_more_input =
(context->available_in != 0) || (fgetc(context->fin) != EOF);
if (has_more_input) {
fprintf(stderr, "corrupt input [%s]\n",
--
2.28.0