netsniff-ng: Protect all access to tpacket v3 structs and constants (this time for...
commit6f7131bae7f31ebc39c1e6a044c46b18d7267a30
authorTobias Klauser <tklauser@distanz.ch>
Thu, 14 Aug 2014 16:30:56 +0000 (14 18:30 +0200)
committerTobias Klauser <tklauser@distanz.ch>
Thu, 14 Aug 2014 16:38:51 +0000 (14 18:38 +0200)
treed91d540ad7e813ed8e069bc770dc77e14870d835
parentd1eef162252faf60b2acb19a1df70c1a5e13ecd2
netsniff-ng: Protect all access to tpacket v3 structs and constants (this time for real)

Commit 0fab564a98d1 ("netsniff-ng: Properly wrap usage of all tpacket v3
structs") took care of protecting _some_ tpacket v3 structures with
compile error when building with !HAVE_TPACKET3 (reported by Mike
Reeves):

>   CC  ring_rx.c
> ring_rx.c: In function 'setup_rx_ring_layout':
> ring_rx.c:124: warning: implicit declaration of function 'set_sockopt_tpacket_v3'
> ring_rx.c: In function 'sock_rx_net_stats':
> ring_rx.c:194: error: field 'k3' has incomplete type
> make: *** [netsniff-ng/ring_rx.o] Error 1

Many thanks to Mike for helping me sort out these problems.

Reported-by: Mike Reeves <luke@geekempire.com>
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
ring.h
ring_rx.c