You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In pcap-int.h, struct pcap is declared to contains a member "fddipad" if PCAP_FDDIPAD is defined, which is defined for NetBSD iff NetBSD_Version is above 106000000, NetBSD_Version is defined in <sys/param.h>.
It happens that pcap-bpf.c includes <sys/param.h>, so when pcap-int.h is included struct pcap is declared and used with the member fddipad. But in pcap.c, <sys/param.h> is not included, neither directly nor indirectly, so when pcap-int.h is included struct pcap is declared and used without the member fddipad.
Now pcap-bpf.c initializes a struct pcap with some function pointers, which just happen to be defined after fddipad. So when pcap.c tries to call such a function, it gets the wrong one. And then it breaks.
Solution:
include <sys/param.h> in pcap.c or pcap-int.h, maybe #ifdef'ed NetBSD
The text was updated successfully, but these errors were encountered:
Converted from SourceForge issue 1675999, submitted by hans_rosenfeld
This one is really nasty.
In pcap-int.h, struct pcap is declared to contains a member "fddipad" if PCAP_FDDIPAD is defined, which is defined for NetBSD iff NetBSD_Version is above 106000000, NetBSD_Version is defined in <sys/param.h>.
It happens that pcap-bpf.c includes <sys/param.h>, so when pcap-int.h is included struct pcap is declared and used with the member fddipad. But in pcap.c, <sys/param.h> is not included, neither directly nor indirectly, so when pcap-int.h is included struct pcap is declared and used without the member fddipad.
Now pcap-bpf.c initializes a struct pcap with some function pointers, which just happen to be defined after fddipad. So when pcap.c tries to call such a function, it gets the wrong one. And then it breaks.
Solution:
include <sys/param.h> in pcap.c or pcap-int.h, maybe #ifdef'ed NetBSD
The text was updated successfully, but these errors were encountered: