From 8e3f8a2661cceeeaf5eea2fd55027ccad558a496 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Revol?= Date: Wed, 27 Mar 2019 02:20:51 +0100 Subject: [PATCH] libmms: add C89 fixes for gcc2 and bump revision --- media-libs/libmms/libmms-0.6.4.recipe | 2 +- .../libmms/patches/libmms-0.6.4.patchset | 55 +++++++++++++++++++ 2 files changed, 56 insertions(+), 1 deletion(-) diff --git a/media-libs/libmms/libmms-0.6.4.recipe b/media-libs/libmms/libmms-0.6.4.recipe index 6a8983465..c271c9c85 100644 --- a/media-libs/libmms/libmms-0.6.4.recipe +++ b/media-libs/libmms/libmms-0.6.4.recipe @@ -6,7 +6,7 @@ doesn't handle sending at all." HOMEPAGE="https://sourceforge.net/projects/libmms/" COPYRIGHT="2009 Xine project" LICENSE="GNU LGPL v2.1" -REVISION="1" +REVISION="2" SOURCE_URI="https://downloads.sourceforge.net/libmms/libmms-$portVersion.tar.gz" CHECKSUM_SHA256="3c05e05aebcbfcc044d9e8c2d4646cd8359be39a3f0ba8ce4e72a9094bee704f" PATCHES="libmms-$portVersion.patchset" diff --git a/media-libs/libmms/patches/libmms-0.6.4.patchset b/media-libs/libmms/patches/libmms-0.6.4.patchset index 59a1840ed..ab28fe8bd 100644 --- a/media-libs/libmms/patches/libmms-0.6.4.patchset +++ b/media-libs/libmms/patches/libmms-0.6.4.patchset @@ -69,3 +69,58 @@ index a019f05..6562ce2 100755 -- 2.19.1 +From a9f692323e597324e6f01263c12b6f4290d5b56f Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Fran=C3=A7ois=20Revol?= +Date: Wed, 27 Mar 2019 02:14:37 +0100 +Subject: [PATCH 2/2] C89 fixes for Haiku + +--- + src/mms-common-funcs.h | 14 +++++++++----- + 1 file changed, 9 insertions(+), 5 deletions(-) + +diff --git a/src/mms-common-funcs.h b/src/mms-common-funcs.h +index 9e3c21d..f273756 100644 +--- a/src/mms-common-funcs.h ++++ b/src/mms-common-funcs.h +@@ -205,12 +205,14 @@ static void interp_asf_header(TYPE *this) + + case GUID_ASF_HEADER_EXTENSION: + { ++ int size; ++ int j = 24 + 18 + 4; ++ int l; ++ + if ((24 + 18 + 4) > length) + break; + +- int size = LE_32(this->asf_header + i + 24 + 18); +- int j = 24 + 18 + 4; +- int l; ++ size = LE_32(this->asf_header + i + 24 + 18); + lprintf("Extension header data size: %d\n", size); + + while ((j + 24) <= length) { +@@ -249,16 +251,18 @@ static void interp_asf_header(TYPE *this) + + // Loop through the number of extension system info + for (x = 0; x < ext_count && (ext_j + 22) <= l; x++) { ++ int len; + ext_j += 18; +- int len = LE_16(this->asf_header + i + j + ext_j); ++ len = LE_16(this->asf_header + i + j + ext_j); + ext_j += 4 + len; + } + + lprintf("ext_j: %d\n", ext_j); + // Finally, we arrive at the interesting point: The optional Stream Property Object + if ((ext_j + 24) <= l) { ++ int len; + guid = get_guid(this->asf_header, i + j + ext_j); +- int len = LE_64(this->asf_header + i + j + ext_j + 16); ++ len = LE_64(this->asf_header + i + j + ext_j + 16); + if (guid == GUID_ASF_STREAM_PROPERTIES && + (ext_j + len) <= l) { + interp_stream_properties(this, i + j + ext_j + 24); +-- +2.19.1 +