ht: fix gcc7 compilation

+13
+2
pkgs/applications/editors/ht/default.nix
··· 15 16 hardeningDisable = [ "format" ]; 17 18 meta = with lib; { 19 description = "File editor/viewer/analyzer for executables"; 20 homepage = http://hte.sourceforge.net;
··· 15 16 hardeningDisable = [ "format" ]; 17 18 + patches = [ ./gcc7.patch ]; 19 + 20 meta = with lib; { 21 description = "File editor/viewer/analyzer for executables"; 22 homepage = http://hte.sourceforge.net;
+11
pkgs/applications/editors/ht/gcc7.patch
···
··· 1 + --- ht-2.1.0.org/htapp.cc 2014-09-14 16:55:26.000000000 +0100 2 + +++ ht-2.1.0/htapp.cc 2018-03-10 12:48:07.158533800 +0000 3 + @@ -3023,7 +3023,7 @@ 4 + { 5 + uint a = 2; 6 + uint b = u/a; 7 + - while (abs(a - b) > 1) { 8 + + while (abs((int)(a - b)) > 1) { 9 + a = (a+b)/2; 10 + b = u/a; 11 + }