commit: f8c5ab82437990540303065670b04fa21b71df82 Author: Peter Levine <plevine457 <AT> gmail <DOT> com> AuthorDate: Sun Mar 25 06:16:42 2018 +0000 Commit: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org> CommitDate: Wed Apr 4 21:37:58 2018 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f8c5ab82
games-emulation/desmume: Fix building with GCC-7 Closes: https://bugs.gentoo.org/646352 Closes: https://github.com/gentoo/gentoo/pull/7606 Package-Manager: Portage-2.3.16, Repoman-2.3.6 games-emulation/desmume/desmume-0.9.11-r1.ebuild | 3 ++- .../desmume/files/desmume-0.9.11-gcc7.patch | 21 +++++++++++++++++++++ 2 files changed, 23 insertions(+), 1 deletion(-) diff --git a/games-emulation/desmume/desmume-0.9.11-r1.ebuild b/games-emulation/desmume/desmume-0.9.11-r1.ebuild index cddcc940a31..d1546468ae8 100644 --- a/games-emulation/desmume/desmume-0.9.11-r1.ebuild +++ b/games-emulation/desmume/desmume-0.9.11-r1.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2017 Gentoo Foundation +# Copyright 1999-2018 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 EAPI=6 @@ -31,4 +31,5 @@ DOCS=( AUTHORS ChangeLog README README.LIN ) PATCHES=( "${FILESDIR}/${P}-fix-pointer-conversion-warning.diff" "${FILESDIR}/${P}-gcc6.patch" + "${FILESDIR}/${P}-gcc7.patch" ) diff --git a/games-emulation/desmume/files/desmume-0.9.11-gcc7.patch b/games-emulation/desmume/files/desmume-0.9.11-gcc7.patch new file mode 100644 index 00000000000..8b8a67f2291 --- /dev/null +++ b/games-emulation/desmume/files/desmume-0.9.11-gcc7.patch @@ -0,0 +1,21 @@ +Bug: https://bugs.gentoo.org/646352 +Patch: https://sources.debian.org/data/main/d/desmume/0.9.11-3/debian/patches/gcc7_fixes.patch + +From e1f7039f1b06add4fb75b2f8774000b8f05574af Mon Sep 17 00:00:00 2001 +From: rogerman <[email protected]> +Date: Mon, 17 Aug 2015 21:15:04 +0000 +Subject: Fix bug with libfat string handling. + +diff --git a/src/utils/libfat/directory.cpp b/src/utils/libfat/directory.cpp +index 765d7ae5..b6d7f01f 100644 +--- a/src/utils/libfat/directory.cpp ++++ b/src/utils/libfat/directory.cpp +@@ -139,7 +139,7 @@ static size_t _FAT_directory_mbstoucs2 (ucs2_t* dst, const char* src, size_t len + int bytes; + size_t count = 0; + +- while (count < len-1 && src != '\0') { ++ while (count < len-1 && *src != '\0') { + bytes = mbrtowc (&tempChar, src, MB_CUR_MAX, &ps); + if (bytes > 0) { + *dst = (ucs2_t)tempChar;
