zzuf: fix build with gcc14

- add patch from fedora:
https://src.fedoraproject.org/rpms/zzuf/c/998c7e5e632ea4c635a53437a01bfb48cbd744ac
fixing `implicit-function-declaration` error:
```
zzat.c: In function 'run':
zzat.c:482:32: error: implicit declaration of function '_IO_getc'
  482 |             MY_FREAD(ch = (n = _IO_getc(f)), &ch, (n != EOF));
      |                                ^~~~~~~~
```

- add patch from fedora (vendored because patch is in format that does not
apply with `fetchpatch`):
https://src.fedoraproject.org/rpms/zzuf/c/ca7e406989e7ff461600084f2277ad15a8c00058
fixing `implicit-function-declaration` error:
```
zzat.c:565:26: error: implicit declaration of function '__fseeko64'; did you mean 'fseeko64'?
  565 |             MY_FSEEK(l = __fseeko64(f, l1, SEEK_CUR),
      |                          ^~~~~~~~~~
```
This commit is contained in:
ghpzin
2025-04-02 17:43:23 +03:00
parent a22e1f1087
commit 7eb5d48a3b
2 changed files with 25 additions and 0 deletions
+12
View File
@@ -2,6 +2,7 @@
lib,
stdenv,
fetchFromGitHub,
fetchpatch,
pkg-config,
autoreconfHook,
}:
@@ -17,6 +18,17 @@ stdenv.mkDerivation rec {
sha256 = "0li1s11xf32dafxq1jbnc8c63313hy9ry09dja2rymk9mza4x2n9";
};
patches = [
# fix build with gcc14
# https://src.fedoraproject.org/rpms/zzuf/c/998c7e5e632ea4c635a53437a01bfb48cbd744ac
(fetchpatch {
url = "https://src.fedoraproject.org/rpms/zzuf/raw/998c7e5e632ea4c635a53437a01bfb48cbd744ac/f/zzuf-zzat-c99.patch";
hash = "sha256-pQQzwsIjKg+9g+dnhFGn2PUlxHlQ5Mj+e4a1D1k2oEo=";
})
# https://src.fedoraproject.org/rpms/zzuf/c/ca7e406989e7ff461600084f2277ad15a8c00058
./zzuf-glibc.patch
];
nativeBuildInputs = [
pkg-config
autoreconfHook
+13
View File
@@ -0,0 +1,13 @@
diff --git a/configure.ac b/configure.ac
index 0915a5c..8ba501c 100644
--- a/configure.ac
+++ b/configure.ac
@@ -79,7 +79,6 @@ AC_CHECK_FUNCS(mmap getpagesize)
AC_CHECK_FUNCS(getc_unlocked getchar_unlocked fgetc_unlocked fread_unlocked fgets_unlocked)
AC_CHECK_FUNCS(__getdelim __srefill __filbuf __srget __uflow)
AC_CHECK_FUNCS(open64 lseek64 mmap64 fopen64 freopen64 ftello64 fseeko64 fsetpos64)
-AC_CHECK_FUNCS(__open64 __lseek64 __fopen64 __freopen64 __ftello64 __fseeko64 __fsetpos64)
AC_CHECK_FUNCS(__fgets_chk __fgets_unlocked_chk __fread_chk __fread_unlocked_chk __read_chk __recv_chk __recvfrom_chk)
AC_CHECK_FUNCS(CreateFileA CreateFileW ReOpenFile ReadFile CloseHandle)
AC_CHECK_FUNCS(AllocConsole AttachConsole SetConsoleMode WriteConsoleOutputA WriteConsoleOutputW)