netsniff-ng: Only use TPACKET_V3 if HAVE_TPACKET3 is defined
commit5bc19d0b84d0d1c448cd4e4ba0e3e7da3503434a
authorTobias Klauser <tklauser@distanz.ch>
Thu, 14 Aug 2014 13:12:34 +0000 (14 15:12 +0200)
committerTobias Klauser <tklauser@distanz.ch>
Thu, 14 Aug 2014 13:12:34 +0000 (14 15:12 +0200)
tree7d920fe9657d7dae59c0b263d57739607630b383
parent930a87b5325c1fb1ee3ad7d42213bc795be87adf
netsniff-ng: Only use TPACKET_V3 if HAVE_TPACKET3 is defined

TPACKET_V3 is not defined if tpacket v3 is not available, thus make its
use conditional on HAVE_TPACKET3. Wrap the check for TPACKET_V3 in
ring_rx in an inline function which always returns false if
HAVE_TPACKET3 is not defined.

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