diff options
author | Guy Harris <guy@alum.mit.edu> | 2010-11-11 07:34:12 +0000 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2010-11-11 07:34:12 +0000 |
commit | ae8a7c8b192c747458eb9a3e6464113067b249e5 (patch) | |
tree | 8da0bb9e99170bba8f325cc132e905770e9ec3fa /dumpcap.c | |
parent | ec42f515db6207228a0f5520860d61adae8df673 (diff) |
OS X 10.6.5 is out, and it re-incorporates the libpcap workaround for
the BPF BIOCSRTIMEOUT bug in 64-bit mode, so we don't need to do our own
workaround in 10.6.5 or later.
svn path=/trunk/; revision=34841
Diffstat (limited to 'dumpcap.c')
-rw-r--r-- | dumpcap.c | 25 |
1 files changed, 10 insertions, 15 deletions
@@ -283,7 +283,7 @@ static loop_data global_ld; * * A bug in Mac OS X 10.6 and 10.6.1 causes calls to pcap_open_live(), in * 64-bit applications, with sub-second timeouts not to work. The bug is - * fixed in 10.6.2 and re-broken in 10.6.3. + * fixed in 10.6.2, re-broken in 10.6.3, and again fixed in 10.6.5. */ #if defined(__APPLE__) && defined(__LP64__) static gboolean need_timeout_workaround; @@ -3366,12 +3366,12 @@ main(int argc, char *argv[]) #if defined(__APPLE__) && defined(__LP64__) /* - * Is this Mac OS X 10.6.x, other than 10.6.2? If so, we need a bug - * workaround - timeouts less than 1 second don't work with libpcap + * Is this Mac OS X 10.6.0, 10.6.1, 10.6.3, or 10.6.4? If so, we need + * a bug workaround - timeouts less than 1 second don't work with libpcap * in 64-bit code. (The bug was introduced in 10.6, fixed in 10.6.2, - * and re-introduced in 10.6.3. We don't know whether it'll be fixed - * again in a later 10.6.x release; we'll assume that it'll be fixed - * in any future major releases.) + * re-introduced in 10.6.3, not fixed in 10.6.4, and fixed in 10.6.5. + * The problem is extremely unlikely to be reintroduced in a future + * release.) */ if (uname(&osinfo) == 0) { /* @@ -3379,15 +3379,10 @@ main(int argc, char *argv[]) * {x+4}.y.0 (except that 10.6.1 appears to have a uname version * number of 10.0.0, not 10.1.0 - go figure). */ - if (strncmp(osinfo.release, "10.", 3) == 0) { - /* - * OK, it's Snow Leopard - which version? - */ - if (strcmp(osinfo.release, "10.2.0") != 0) { - /* Not 10.6.2. */ - need_timeout_workaround = TRUE; - } - } + if (strcmp(osinfo.release, "10.0.0") == 0 || /* 10.6, 10.6.1 */ + strcmp(osinfo.release, "10.3.0") == 0 || /* 10.6.3 */ + strcmp(osinfo.release, "10.4.0") == 0) /* 10.6.4 */ + need_timeout_workaround = TRUE; } #endif |