3
0
Fork 0
forked from mirrors/nixpkgs

Merge pull request #28914 from disassembler/jigdo

jigdo: fix gcc build failures
This commit is contained in:
Michael Raskin 2017-09-03 10:18:51 +02:00 committed by GitHub
commit 148999742e
2 changed files with 47 additions and 4 deletions

View file

@ -9,10 +9,13 @@ stdenv.mkDerivation {
sha256 = "1qvqzgzb0dzq82fa1ffs6hyij655rajnfwkljk1y0mnkygnha1xv";
};
patches = fetchurl {
url = http://ftp.de.debian.org/debian/pool/main/j/jigdo/jigdo_0.7.3-3.diff.gz;
sha256 = "0cp4jz3sg9g86vprh90pmwpcfla79f0dr50w14yh01k0yaq70fs8";
};
patches = [
(fetchurl {
url = http://ftp.de.debian.org/debian/pool/main/j/jigdo/jigdo_0.7.3-4.diff.gz;
sha256 = "03zsh57fijciiv23lf55k6fbfhhzm866xjhx83x54v5s1g2h6m8y";
})
./sizewidth.patch
];
buildInputs = [ db gtk2 bzip2 ];

View file

@ -0,0 +1,40 @@
diff --git i/src/mkimage.cc w/src/mkimage.cc
index 02e65b1..b263796 100755
--- i/src/mkimage.cc
+++ w/src/mkimage.cc
@@ -285,27 +285,27 @@ bostream& JigdoDescVec::put(bostream& file, MD5Sum* md) const {
//______________________________________________________________________
namespace {
- const int SIZE_WIDTH = 12;
+ const int MKIMAGE_SIZE_WIDTH = 12;
}
ostream& JigdoDesc::ImageInfo::put(ostream& s) const {
- s << "image-info " << setw(SIZE_WIDTH) << size() << " "
+ s << "image-info " << setw(MKIMAGE_SIZE_WIDTH) << size() << " "
<< md5() << ' ' << blockLength() << '\n';
return s;
}
ostream& JigdoDesc::UnmatchedData::put(ostream& s) const {
- s << "in-template " << setw(SIZE_WIDTH) << offset() << ' '
- << setw(SIZE_WIDTH) << size() << '\n';
+ s << "in-template " << setw(MKIMAGE_SIZE_WIDTH) << offset() << ' '
+ << setw(MKIMAGE_SIZE_WIDTH) << size() << '\n';
return s;
}
ostream& JigdoDesc::MatchedFile::put(ostream& s) const {
- s << "need-file " << setw(SIZE_WIDTH) << offset() << ' '
- << setw(SIZE_WIDTH) << size() << ' ' << md5() << ' ' << rsync() << '\n';
+ s << "need-file " << setw(MKIMAGE_SIZE_WIDTH) << offset() << ' '
+ << setw(MKIMAGE_SIZE_WIDTH) << size() << ' ' << md5() << ' ' << rsync() << '\n';
return s;
}
ostream& JigdoDesc::WrittenFile::put(ostream& s) const {
- s << "have-file " << setw(SIZE_WIDTH) << offset() << ' '
- << setw(SIZE_WIDTH) << size() << ' ' << md5() << ' ' << rsync() << '\n';
+ s << "have-file " << setw(MKIMAGE_SIZE_WIDTH) << offset() << ' '
+ << setw(MKIMAGE_SIZE_WIDTH) << size() << ' ' << md5() << ' ' << rsync() << '\n';
return s;
}