Skip to content

Commit

Permalink
Merge pull request #15 from bassosimone/fix/linux-immediate-mode
Browse files Browse the repository at this point in the history
pcap_ex.c: fix immediate mode for linux
  • Loading branch information
hellais committed Apr 18, 2016
2 parents a6a2f14 + 88547d8 commit f579535
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion pcap_ex.c
Expand Up @@ -34,9 +34,11 @@ pcap_ex_immediate(pcap_t *pcap)
#elif defined BIOCIMMEDIATE
int n = 1;
return ioctl(pcap_fileno(pcap), BIOCIMMEDIATE, &n);
#else /* XXX On OSX Yosemite (10.10.3) BIOCIMMEDIATE is not defined) */
#elif defined __APPLE__ /* XXX On OSX Yosemite (10.10.3) BIOCIMMEDIATE is not defined) */
int n = 1;
return ioctl(pcap_fileno(pcap), _IOW('B',112, u_int), &n);
#else
return 0;
#endif
}

Expand Down

0 comments on commit f579535

Please sign in to comment.