gnu-smalltalk: fix build with gcc 14 (#430903)

This commit is contained in:
Yohann Boniface
2025-08-05 00:22:38 +02:00
committed by GitHub
2 changed files with 39 additions and 11 deletions
@@ -0,0 +1,26 @@
diff --git a/packages/iconv/iconv.c b/packages/iconv/iconv.c
index ba2c38a7..55c2e737 100644
--- a/packages/iconv/iconv.c
+++ b/packages/iconv/iconv.c
@@ -66,7 +66,7 @@ iconvWrapper (iconv_t handle, OOP readBufferOOP, int readPos,
int readCount, OOP writeBufferOOP, int writeCount,
OOP bytesLeftOOP)
{
- const char *inbuf;
+ char *inbuf;
size_t inbytesleft;
char *outbuf;
size_t outbytesleft;
diff --git a/packages/xml/expat/expat.c b/packages/xml/expat/expat.c
index 0ceee46c..4ea35289 100644
--- a/packages/xml/expat/expat.c
+++ b/packages/xml/expat/expat.c
@@ -573,7 +573,7 @@ gst_XML_ParserCreate (OOP parserOOP)
XML_SetNotationDeclHandler (p, gst_NotationDeclHandler);
XML_SetStartNamespaceDeclHandler (p, gst_StartNamespaceDeclHandler);
XML_SetEndNamespaceDeclHandler (p, gst_EndNamespaceDeclHandler);
- XML_SetSkippedEntityHandler (p, gst_SkippedEntityHandler);
+ XML_SetSkippedEntityHandler (p, (void (*)(void *, const XML_Char *, int))(gst_SkippedEntityHandler));
XML_SetReturnNSTriplet (p, true);
if (!saxEventSequenceClass)
+13 -11
View File
@@ -33,22 +33,24 @@ let
});
in
stdenv.mkDerivation rec {
version = "3.2.5";
stdenv.mkDerivation (finalAttrs: {
pname = "gnu-smalltalk";
version = "3.2.5";
src = fetchurl {
url = "mirror://gnu/smalltalk/smalltalk-${version}.tar.xz";
sha256 = "1k2ssrapfzhngc7bg1zrnd9n2vyxp9c9m70byvsma6wapbvib6l1";
url = "mirror://gnu/smalltalk/smalltalk-${finalAttrs.version}.tar.xz";
hash = "sha256-gZoV97qKG1X19gucmli63W9hU7P5h7cOexZ+d1XWWsw=";
};
patches = [
# The awk script incorrectly parsed `glib/glib.h` and was trying to find `glib/gwin32.h`,
# that isn't included since we're building only for linux.
./0000-fix_mkorder.patch
./0001-fix-compilation.patch
];
enableParallelBuilding = true;
# The dependencies and their justification are explained at
# http://smalltalk.gnu.org/download
nativeBuildInputs = [ pkg-config ];
@@ -71,13 +73,13 @@ stdenv.mkDerivation rec {
hardeningDisable = [ "format" ];
installFlags = lib.optional emacsSupport "lispdir=$(out)/share/emacs/site-lisp";
installFlags = lib.optional emacsSupport "lispdir=${placeholder "$out"}/share/emacs/site-lisp";
# For some reason the tests fail if executated with nix-build, but pass if
# executed within nix-shell --pure.
doCheck = false;
meta = with lib; {
meta = {
description = "Free implementation of the Smalltalk-80 language";
longDescription = ''
GNU Smalltalk is a free implementation of the Smalltalk-80 language. It
@@ -86,11 +88,11 @@ stdenv.mkDerivation rec {
language, well-versed to scripting tasks.
'';
homepage = "http://smalltalk.gnu.org/";
license = with licenses; [
license = with lib.licenses; [
gpl2
lgpl2
];
platforms = platforms.linux;
maintainers = with maintainers; [ ];
platforms = lib.platforms.linux;
maintainers = with lib.maintainers; [ ];
};
}
})