gentoo-ebuilds/net-analyzer/flow-tools/files/flow-tools-0.68.6-c99-c23.patch
Sam James a3001edf46
net-analyzer/flow-tools: EAPI 8; fix modern C issues & LTO; fix config path
* EAPI 8

* Modern C porting
** Fix a C99 issue (missing 'config.h' include in lexer)
** Fix a C23 issue (mismatched function pointer types)
** Fix an LTO issue (yy* prefix clash, linker warning)

* Fix config location

  The upstream location was fixed in 6bccc64533fcc32597a4cc8de07fd031019ea2fd
  but we retained our --sysconfdir workaround with the bump to 0.68.6, which
  meant configs were installed to /etc/flow-tools/flow-tools/.

  Fix that and add a warning...

Closes: https://bugs.gentoo.org/785040
Closes: https://bugs.gentoo.org/851159
Signed-off-by: Sam James <sam@gentoo.org>
2025-09-08 01:08:45 +01:00

41 lines
1,022 B
Diff

https://bugs.gentoo.org/945075
--- a/lib/ftstat.c
+++ b/lib/ftstat.c
@@ -831,11 +831,11 @@ struct jump {
struct typelookup {
char *name;
- void* (*f_new)();
- void* (*f_accum)();
- void* (*f_calc)();
- void* (*f_dump)();
- void* (*f_free)();
+ void* (*f_new)(struct ftstat_rpt *);
+ void* (*f_accum)(struct ftstat_rpt *, char *, struct fts3rec_offsets *);
+ void* (*f_calc)(struct ftstat_rpt *);
+ void* (*f_dump)(FILE *, struct ftio *, struct ftstat_rpt *);
+ void* (*f_free)(void *);
int allowed_fields; /* FT_STAT_FIELD_* */
int allowed_options;/* FT_STAT_OPT_* */
uint64_t xfields; /* FT_XFIELD_* */
--- a/src/acllex.l
+++ b/src/acllex.l
@@ -1,4 +1,5 @@
%{
+#include <ftconfig.h>
#include <ftlib.h>
#if HAVE_STRINGS_H
--- a/src/flow-print.c
+++ b/src/flow-print.c
@@ -89,9 +89,7 @@ struct jump format[] = {{format0}, {format1}, {format2},
void usage(void);
-int main(argc, argv)
-int argc;
-char **argv;
+int main(int argc, char **argv)
{
struct ftio ftio;
struct ftprof ftp;