summaryrefslogtreecommitdiff
path: root/gnu/packages/patches
diff options
context:
space:
mode:
authorMarius Bakke <marius@gnu.org>2021-12-17 17:13:03 +0100
committerMarius Bakke <marius@gnu.org>2021-12-17 19:07:17 +0100
commite0559c531425da5a689d14553af7873528b49d09 (patch)
treea26e6cb317d55dc4fb3292d2e42d97ea76b2b8da /gnu/packages/patches
parentd080368cb5159613a1ff6611e55e09b62977383e (diff)
downloadguix-patches-e0559c531425da5a689d14553af7873528b49d09.tar
guix-patches-e0559c531425da5a689d14553af7873528b49d09.tar.gz
gnu: grfcodec: Fix build with GCC 10.
* gnu/packages/patches/grfcodec-gcc-compat.patch: New file. * gnu/local.mk (dist_patch_DATA): Adjust accordingly. * gnu/packages/game-development.scm (grfcodec)[source](patches): New field. [arguments]: Remove trailing #t.
Diffstat (limited to 'gnu/packages/patches')
-rw-r--r--gnu/packages/patches/grfcodec-gcc-compat.patch31
1 files changed, 31 insertions, 0 deletions
diff --git a/gnu/packages/patches/grfcodec-gcc-compat.patch b/gnu/packages/patches/grfcodec-gcc-compat.patch
new file mode 100644
index 0000000000..02685d46fd
--- /dev/null
+++ b/gnu/packages/patches/grfcodec-gcc-compat.patch
@@ -0,0 +1,31 @@
+Fix type comparison issue that is a hard error in GCC 10.
+
+Taken from upstream:
+
+ https://github.com/OpenTTD/grfcodec/commit/bb692b2c723c5e87cc8f89f445928e97594d5b8f
+
+diff --git a/src/command.cpp b/src/command.cpp
+index 9aa0e14..1f32cf1 100644
+--- a/src/command.cpp
++++ b/src/command.cpp
+@@ -300,8 +300,9 @@ bool parse_comment(const string&line){
+ break;
+ case BEAUTIFY:{
+ commandstream>>command_part;
+- uint val=find_command(command_part,beaut),togglebit;
+- if(val!=(uint)-1&&val!=OFF)_commandState.beautifier=true;
++ int val=find_command(command_part,beaut);
++ uint togglebit;
++ if(val!=-1&&val!=OFF)_commandState.beautifier=true;
+ switch(val){
+ case -1:
+ IssueMessage(0,COMMAND_INVALID_ARG,gen[BEAUTIFY].name);
+@@ -372,7 +373,7 @@ bool parse_comment(const string&line){
+ dotoggle:
+ commandstream>>command_part;
+ val=find_command(command_part,beaut);
+- if(!commandstream||val==(uint)-1){
++ if(!commandstream||val==-1){
+ IssueMessage(0,COMMAND_INVALID_ARG,gen[BEAUTIFY].name);
+ return true;
+ }