Merge pull request #36753 from Mic92/ht

ht: fix gcc7 compilation
This commit is contained in:
Jörg Thalheim 2018-03-10 16:00:51 +00:00 committed by GitHub
commit 0c159930e7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 13 additions and 0 deletions

View file

@ -15,6 +15,8 @@ stdenv.mkDerivation rec {
hardeningDisable = [ "format" ];
patches = [ ./gcc7.patch ];
meta = with lib; {
description = "File editor/viewer/analyzer for executables";
homepage = http://hte.sourceforge.net;

View file

@ -0,0 +1,11 @@
--- ht-2.1.0.org/htapp.cc 2014-09-14 16:55:26.000000000 +0100
+++ ht-2.1.0/htapp.cc 2018-03-10 12:48:07.158533800 +0000
@@ -3023,7 +3023,7 @@
{
uint a = 2;
uint b = u/a;
- while (abs(a - b) > 1) {
+ while (abs((int)(a - b)) > 1) {
a = (a+b)/2;
b = u/a;
}