aboutsummaryrefslogtreecommitdiff
path: root/pcap-linux.c
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2013-12-15 02:36:51 -0800
committerGuy Harris <guy@alum.mit.edu>2013-12-15 02:36:51 -0800
commit108fbdd945f313c17b8f4214e3b2441ae60aff91 (patch)
tree8893da5604545b9c5e595e4453b367e97a2e7d7c /pcap-linux.c
parent86b47f156ccc8be9b7143e1bc04d7d8fbf995383 (diff)
Fix builds on systems without TPACKET_V3.
Diffstat (limited to 'pcap-linux.c')
-rw-r--r--pcap-linux.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/pcap-linux.c b/pcap-linux.c
index 7a05ff29..a83f418d 100644
--- a/pcap-linux.c
+++ b/pcap-linux.c
@@ -4086,6 +4086,7 @@ static int pcap_wait_for_frames_mmap(pcap_t *handle)
pollinfo.events = POLLIN;
if (handlep->timeout == 0) {
+#ifdef TPACKET_V3
/*
* XXX - due to a set of (mis)features in the
* TPACKET_V3 kernel code, blocking forever with
@@ -4106,6 +4107,7 @@ static int pcap_wait_for_frames_mmap(pcap_t *handle)
if (handlep->tp_version == TPACKET_V3)
timeout = 1; /* don't block for very long */
else
+#endif
timeout = -1; /* block forever */
} else if (handlep->timeout > 0)
timeout = handlep->timeout; /* block for that amount of time */