0002-src-parser.y-fix-build-with-gcc-14.patch 1.0 KB

123456789101112131415161718192021222324252627282930313233343536
  1. From 96f5ad56b1bb872c2c24f0c83d06d94ae2936838 Mon Sep 17 00:00:00 2001
  2. From: Fabrice Fontaine <fontaine.fabrice@gmail.com>
  3. Date: Mon, 22 Jul 2024 14:08:45 +0200
  4. Subject: [PATCH] src/parser.y: fix build with gcc >= 14
  5. Fix the following build failure with gcc >= 14:
  6. parser.c: In function 'yyparse':
  7. parser.c:1196:16: error: implicit declaration of function 'yylex' [-Wimplicit-function-declaration]
  8. 1196 | yychar = yylex ();
  9. | ^~~~~
  10. Fixes:
  11. - http://autobuild.buildroot.org/results/33364071de4e5e51a2ac2337b82d145f71e0e64a
  12. Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
  13. Upstream: https://github.com/nroach44/bandwidthd/pull/3
  14. ---
  15. src/parser.y | 1 +
  16. 1 file changed, 1 insertion(+)
  17. diff --git a/src/parser.y b/src/parser.y
  18. index d9acc10..15ce61c 100644
  19. --- a/src/parser.y
  20. +++ b/src/parser.y
  21. @@ -11,6 +11,7 @@
  22. #include <arpa/inet.h>
  23. #include "bandwidthd.h"
  24. +extern int yylex (void);
  25. extern unsigned int SubnetCount;
  26. extern struct SubnetData SubnetTable[];
  27. extern struct config config;
  28. --
  29. 2.43.0