[trigger-rally] 08/14: Add a patch from upstream to fix build with GCC 5+.

Bertrand Marc bmarc at moszumanska.debian.org
Wed Aug 31 13:44:34 UTC 2016


This is an automated email from the git hooks/post-receive script.

bmarc pushed a commit to branch master
in repository trigger-rally.

commit 3c6c02b3c2fcd7d5db90448a701de31ea70c545a
Author: Bertrand Marc <bmarc at debian.org>
Date:   Wed Aug 31 10:18:51 2016 +0200

    Add a patch from upstream to fix build with GCC 5+.
---
 debian/patches/fix_build_gcc5.patch | 45 +++++++++++++++++++++++++++++++++++++
 debian/patches/series               |  1 +
 2 files changed, 46 insertions(+)

diff --git a/debian/patches/fix_build_gcc5.patch b/debian/patches/fix_build_gcc5.patch
new file mode 100644
index 0000000..ca649cd
--- /dev/null
+++ b/debian/patches/fix_build_gcc5.patch
@@ -0,0 +1,45 @@
+Description: fix build with gcc 5+
+Origin: upstream
+Applied-Upstream: commit: r798
+--- a/src/include/hiscore1.h
++++ b/src/include/hiscore1.h
+@@ -41,6 +41,16 @@
+         return InputStream;                                         \
+ } else (void)0
+ 
++// TODO: remove duplicate code
++#define GETLINE_SKIP_EMPTY_LINES_B(InputStream, String) if (true) { \
++    while (std::getline(InputStream, String)) {                     \
++        if (!String.empty())                                        \
++            break;                                                  \
++    }                                                               \
++    if (String.empty())                                             \
++        return static_cast<bool> (InputStream);                     \
++} else (void)0
++
+ ///
+ /// @brief Basic structure to load and save race results.
+ ///
+@@ -724,19 +734,19 @@
+         std::istringstream sspdata(decrypt(pdata));
+ #undef decrypt
+ 
+-        GETLINE_SKIP_EMPTY_LINES(sspdata, ts);
++        GETLINE_SKIP_EMPTY_LINES_B(sspdata, ts);
+         nu = std::stoul(ts);
+ 
+         while (nu-- != 0)
+         {
+-            GETLINE_SKIP_EMPTY_LINES(sspdata, ts);
++            GETLINE_SKIP_EMPTY_LINES_B(sspdata, ts);
+             allunlocks[pname].insert(ts);
+         }
+ 
+         while (sspdata >> rd)
+             alltimes.insert({rd.mapname, rd});
+ 
+-        return sspdata;
++        return static_cast<bool> (sspdata);
+     }
+ 
+     ///
diff --git a/debian/patches/series b/debian/patches/series
index d3aa7c8..59d2cc2 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1 +1,2 @@
+fix_build_gcc5.patch
 20_system_tinyxml.patch

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-games/trigger-rally.git



More information about the Pkg-games-commits mailing list