msieve: unbreak on GCC 14 (#392185)

+35
+4
pkgs/by-name/ms/msieve/package.nix
··· 17 hash = "sha256-6ErVn4pYPMG5VFjOQURLsHNpN0pGdp55+rjY8988onU="; 18 }; 19 20 buildInputs = [ 21 zlib 22 gmp ··· 30 "CC=${stdenv.cc.targetPrefix}cc" 31 "all" 32 ]; 33 34 installPhase = '' 35 mkdir -p $out/bin/
··· 17 hash = "sha256-6ErVn4pYPMG5VFjOQURLsHNpN0pGdp55+rjY8988onU="; 18 }; 19 20 + patches = [ ./savefile_t-pointer-type.patch ]; 21 + 22 buildInputs = [ 23 zlib 24 gmp ··· 32 "CC=${stdenv.cc.targetPrefix}cc" 33 "all" 34 ]; 35 + 36 + enableParallelBuilding = true; 37 38 installPhase = '' 39 mkdir -p $out/bin/
+31
pkgs/by-name/ms/msieve/savefile_t-pointer-type.patch
···
··· 1 + Index: include/msieve.h 2 + =================================================================== 3 + --- a/include/msieve.h 4 + +++ b/include/msieve.h 5 + @@ -100,9 +100,9 @@ 6 + HANDLE file_handle; 7 + uint32 read_size; 8 + uint32 eof; 9 + #else 10 + - gzFile *fp; 11 + + gzFile fp; 12 + char isCompressed; 13 + char is_a_FILE; 14 + #endif 15 + char *name; 16 + 17 + Index: common/savefile.c 18 + =================================================================== 19 + --- a/common/savefile.c 20 + +++ b/common/savefile.c 21 + @@ -151,9 +151,9 @@ 22 + so we will fopen a FILE to append plainly */ 23 + fclose(fp); 24 + } 25 + if (s->is_a_FILE) { 26 + - s->fp = (gzFile *)fopen(s->name, "a"); 27 + + s->fp = (gzFile)fopen(s->name, "a"); 28 + } else { 29 + s->fp = gzopen(s->name, "a"); 30 + s->isCompressed = 1; 31 + }