diff options
Diffstat (limited to 'net/trafshow/files/patch-trafshow.c')
-rw-r--r-- | net/trafshow/files/patch-trafshow.c | 21 |
1 files changed, 10 insertions, 11 deletions
diff --git a/net/trafshow/files/patch-trafshow.c b/net/trafshow/files/patch-trafshow.c index a797fa9409fc..a5a92eaf6118 100644 --- a/net/trafshow/files/patch-trafshow.c +++ b/net/trafshow/files/patch-trafshow.c @@ -1,22 +1,22 @@ ---- trafshow.c.orig Sun Jan 8 08:05:29 2006 -+++ trafshow.c Wed Feb 1 18:07:33 2006 +--- trafshow.c.orig Wed Apr 12 00:10:18 2006 ++++ trafshow.c Wed Apr 12 00:12:49 2006 @@ -20,6 +20,7 @@ #endif #include <sys/types.h> #include <sys/socket.h> +#include <sys/ioctl.h> - #include <stdio.h> - #include <stdlib.h> - #include <signal.h> -@@ -281,6 +282,7 @@ - pcap_t *pd; + #ifdef HAVE_PCAP_GET_SELECTABLE_FD + #include <sys/select.h> + #endif +@@ -307,6 +308,7 @@ + const pcap_addr_t *ap; PCAP_HANDLER *ph, *ph_prev = 0; - char buf[256]; -+ u_int v; + char *cp, buf[256]; ++ int v = 1; if (!ph_list) return -1; -@@ -307,6 +309,13 @@ +@@ -334,6 +336,12 @@ } if (pcap_setnonblock(pd, 1, buf) < 0) { fprintf(stderr, "%s: %s\n", dp->name, buf); @@ -24,7 +24,6 @@ + err++; + continue; + } -+ v = 1; + if (ioctl(pcap_fileno(pd), BIOCIMMEDIATE, &v) < 0) { + fprintf(stderr, "%s: %s\n", dp->name, strerror(errno)); pcap_close(pd); |