msieve: unbreak on GCC 14 (#392185)
This commit is contained in:
@@ -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/
|
||||
|
||||
@@ -0,0 +1,31 @@
|
||||
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;
|
||||
}
|
||||
Reference in New Issue
Block a user