as31: fix build with gcc14

- add patch from debian:
https://salsa.debian.org/debian/as31/-/blob/76735fbf1fb00ce70ffd98385137908b7bd9bd5c/debian/patches/update_sizebuf_types.patch
fixing `incompatible-pointer-types` errors with gcc14:
```
run.c: In function 'run_as31':
run.c:109:41: error: passing argument 2 of 'getline' from incompatible pointer type
  109 |                 if (getline(&lineBuffer,&sizeBuf,finPre) == -1)
      |                                         ^~~~~~~~
      |                                         |
      |                                         int *
In file included from /nix/store/kj8hbqx4ds9qm9mq7hyikxyfwwg13kzj-glibc-2.40-36-dev/include/stdio.h:966,
                 from run.c:2:
/nix/store/kj8hbqx4ds9qm9mq7hyikxyfwwg13kzj-glibc-2.40-36-dev/include/bits/stdio.h:118:36:
note: expected 'size_t *' {aka 'long unsigned int *'} but argument is of type 'int *'
  118 | getline (char **__lineptr, size_t *__n, FILE *__stream)
      |                            ~~~~~~~~^~~
run.c:135:68: error: passing argument 2 of 'getline' from incompatible pointer type
  135 |                                         if (getline(&incLineBuffer,&incSizeBuf,includeFile) == -1)
      |                                                                    ^~~~~~~~~~~
      |                                                                    |
      |                                                                    int *
/nix/store/kj8hbqx4ds9qm9mq7hyikxyfwwg13kzj-glibc-2.40-36-dev/include/bits/stdio.h:118:36:
note: expected 'size_t *' {aka 'long unsigned int *'} but argument is of type 'int *'
  118 | getline (char **__lineptr, size_t *__n, FILE *__stream)
      |                            ~~~~~~~~^~~
```
This commit is contained in:
ghpzin
2025-04-03 23:06:44 +03:00
parent e7241d6260
commit f4066cd966
+7
View File
@@ -2,6 +2,7 @@
lib,
stdenv,
fetchurl,
fetchpatch,
bison,
}:
@@ -18,6 +19,12 @@ stdenv.mkDerivation rec {
patches = [
# Check return value of getline in run.c
./0000-getline-break.patch
# fix build with gcc14
(fetchpatch {
url = "https://salsa.debian.org/debian/as31/-/raw/76735fbf1fb00ce70ffd98385137908b7bd9bd5c/debian/patches/update_sizebuf_types.patch";
hash = "sha256-ERrPdY0afKwXmdSLoWmWR55nKfvmieGlz+nhwFWRnrM=";
})
];
postPatch = ''