gentoo-ebuilds/app-forensics/zzuf/files/zzuf-0.15_implicit_functions.patch
Marek Szuba 0bac9cd799
app-forensics/zzuf: add 0.15_p20220529
As far as upstream is concerned this snapshot is identical to _p20190208
apart from some typos in the documentation having been fixed. On the
Gentoo side, however, this ebuild adds support for building with
-Werror=implicit-function-declaration along with removing the previously
hard-coded '-g -O2' from compiler flags.

Closes: https://bugs.gentoo.org/871558
Signed-off-by: Marek Szuba <marecki@gentoo.org>
2023-08-20 00:06:41 +01:00

32 lines
720 B
Diff

--- a/src/libc_fcns.h
+++ b/src/libc_fcns.h
@@ -0,0 +1,8 @@
+#ifndef _ZZUF_LIBC_FCNS_H
+#define _ZZUF_LIBC_FCNS_H
+
+/* Prototypes for internal libc functions zzuf hooks into */
+extern int __fseeko64(FILE *fp, off64_t offset, int whence);
+extern int _IO_getc(FILE *__fp);
+
+#endif
--- a/src/libzzuf/lib-stream.c
+++ b/src/libzzuf/lib-stream.c
@@ -57,6 +57,7 @@
#include "debug.h"
#include "fuzz.h"
#include "fd.h"
+#include "libc_fcns.h"
#if defined HAVE_FPOS64_T
# define FPOS64_T fpos64_t
--- a/src/zzat.c
+++ b/src/zzat.c
@@ -51,6 +51,8 @@
#include "util/getopt.h"
+#include "libc_fcns.h"
+
static int run(char const *sequence, char const *file);
static void output(char const *buf, size_t len);