]> The Tcpdump Group git mirrors - libpcap/commitdiff
No, the incomplete structure declarations aren't necessary.
authorGuy Harris <[email protected]>
Sun, 12 Jun 2016 21:22:59 +0000 (14:22 -0700)
committerGuy Harris <[email protected]>
Sun, 12 Jun 2016 21:22:59 +0000 (14:22 -0700)
An implicit such declaration is done by the typedefs; the compiler
complaints were due to the user declaring a struct pcap or a pcap_t,
rather than a pointer to a struct pcap or a pcap_t - you can't do that.

pcap/pcap.h

index b368abada57e61f8bf91a5aac1d5db90bd9e6469..b5d50b8e5785a5264be413f5129901725d289ea6 100644 (file)
@@ -78,11 +78,6 @@ typedef      int bpf_int32;
 typedef        u_int bpf_u_int32;
 #endif
 
-struct pcap;
-struct pcap_dumper;
-struct pcap_if;
-struct pcap_addr;
-
 typedef struct pcap pcap_t;
 typedef struct pcap_dumper pcap_dumper_t;
 typedef struct pcap_if pcap_if_t;