Commit 3f72a67d authored by Petr Zahradnik's avatar Petr Zahradnik
Browse files

msieve: unbreak on GCC 14

parent f263f125
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -17,6 +17,8 @@ stdenv.mkDerivation rec {
    hash = "sha256-6ErVn4pYPMG5VFjOQURLsHNpN0pGdp55+rjY8988onU=";
  };

  patches = [ ./savefile_t-pointer-type.patch ];

  buildInputs = [
    zlib
    gmp
@@ -31,6 +33,8 @@ stdenv.mkDerivation rec {
    "all"
  ];

  enableParallelBuilding = true;

  installPhase = ''
    mkdir -p $out/bin/
    cp msieve $out/bin/
+31 −0
Original line number Diff line number Diff line
Index: include/msieve.h
===================================================================
--- a/include/msieve.h
+++ b/include/msieve.h
@@ -100,9 +100,9 @@
 	HANDLE file_handle;
 	uint32 read_size;
 	uint32 eof;
 #else
-	gzFile *fp;
+	gzFile fp;
 	char isCompressed;
 	char is_a_FILE;
 #endif
 	char *name;

Index: common/savefile.c
===================================================================
--- a/common/savefile.c
+++ b/common/savefile.c
@@ -151,9 +151,9 @@
 			   so we will fopen a FILE to append plainly */
 			fclose(fp);
 		}
 		if (s->is_a_FILE) {
-			s->fp = (gzFile *)fopen(s->name, "a");
+			s->fp = (gzFile)fopen(s->name, "a");
 		} else {
 			s->fp = gzopen(s->name, "a");
 			s->isCompressed = 1;
 		}