Sorry if I am wrong but I am trying to compile the libpcap for Android with NDK. Finally, I get this error:
in grammar.y we can see :
#ifndef YYBISON
int yyparse(void);
int
pcap_parse()
{
return (yyparse());
}
#endif
=> pcap_parse is defined if YYBISON is not defined
BUT in gencode.c, we have (line 342)
lex_init(buf ? buf : "");
init_linktype(pcap_datalink(p));
(void)pcap_parse();
AND in gencode.h (line 299)
struct bpf_insn *icode_to_fcode(struct block *, int *);
int pcap_parse(void);
void lex_init(char *);
void lex_cleanup(void);
=> pcap_parse if used without any test case !!
Result is a libpcap wrong if YYBISON is defined
(undedefined function pcap_parse)
Where is my error?
the solution was really easy. I just do a
make distcleanat the sources. If it doesn’t work try to agit reset --hardand it should be fixed.Thanks everyone