media-libs/libmp4v2: Fix build with gcc7, patch by Collin Day in bug #600892
authorAlexis Ballier <aballier@gentoo.org>
Mon, 19 Jun 2017 16:15:50 +0000 (18:15 +0200)
committerAlexis Ballier <aballier@gentoo.org>
Mon, 19 Jun 2017 16:16:06 +0000 (18:16 +0200)
Package-Manager: Portage-2.3.6, Repoman-2.3.2

media-libs/libmp4v2/files/gcc7.patch [new file with mode: 0644]
media-libs/libmp4v2/libmp4v2-2.0.0.ebuild

diff --git a/media-libs/libmp4v2/files/gcc7.patch b/media-libs/libmp4v2/files/gcc7.patch
new file mode 100644 (file)
index 0000000..fbfae97
--- /dev/null
@@ -0,0 +1,13 @@
+https://bugs.gentoo.org/show_bug.cgi?id=600892
+
+--- mp4v2-2.0.0/src/rtphint.cpp        2012-05-20 16:11:53.000000000 -0600
++++ /tmp/rtphint.cpp   2017-05-16 10:25:26.930705191 -0600
+@@ -339,7 +339,7 @@
+                 pSlash = strchr(pSlash, '/');
+                 if (pSlash != NULL) {
+                     pSlash++;
+-                    if (pSlash != '\0') {
++                    if (*pSlash != '\0') {
+                         length = (uint32_t)strlen(pRtpMap) - (pSlash - pRtpMap);
+                         *ppEncodingParams = (char *)MP4Calloc(length + 1);
+                         strncpy(*ppEncodingParams, pSlash, length);
index de5efb03d9ed424227444cecc1c3fb91d6b783c7..b45b0b997eec682782037db96743bb5b238170d0 100644 (file)
@@ -1,8 +1,8 @@
-# Copyright 1999-2012 Gentoo Foundation
+# Copyright 1999-2017 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=4
-inherit libtool
+inherit libtool eutils
 
 MY_P=${P/lib}
 
@@ -25,6 +25,7 @@ DOCS="doc/*.txt README"
 S=${WORKDIR}/${MY_P}
 
 src_prepare() {
+       epatch "${FILESDIR}/gcc7.patch"
        elibtoolize
 }