Description: use the real extract() prototype and fix yyerror return type
 The extract function was declared with an empty parameter list, a K&R
 style construct that modern C standards treat as "no arguments", turning
 the five argument calls into a build failure on GCC 14/15. Declare the
 complete prototype with a forward declaration of struct slist_node to
 avoid the mutually recursive header situation mentioned in the comment.
 Also give yyerror an explicit int return type instead of relying on the
 implicit int, which is an error by default since GCC 14.
Author: tangxiaofeng <tangxiaofeng@kylinos.cn>
Origin: debian
Forwarded: no
Last-Update: 2026-09-05

--- tcpxtract-1.0.1.orig/confy.y
+++ tcpxtract-1.0.1/confy.y
@@ -58,7 +58,7 @@ expression: WORD '(' NUMBER ',' SPECIFIE
 
 %%
 #include <stdio.h>
-yyerror(char *s)
+int yyerror(char *s)
 {
 	printf("%s\n", s);
 }
--- tcpxtract-1.0.1.orig/extract.h
+++ tcpxtract-1.0.1/extract.h
@@ -41,10 +41,10 @@ typedef struct extract_list {
     int finish;             /* this mark is set when a footer is found */
 } extract_list_t;
 
-// Using slist_t in the prototype created a mutually recursive header situation
-// that will not compile.
-//extern void extract(extract_list_t **, srch_results_t *, slist_t *, const uint8_t *, size_t);
-extern void extract();
+/* Using slist_t in the prototype would require including sessionlist.h,
+ * which includes this header back; a forward declaration avoids the cycle. */
+struct slist_node;
+extern void extract(extract_list_t **, srch_results_t *, struct slist_node *, const uint8_t *, size_t);
 extern int filenum;
 extern char *output_prefix;
 

