OS X 10.6.5 is out, and it re-incorporates the libpcap workaround for
authorguy <guy@f5534014-38df-0310-8fa8-9805f1628bb7>
Thu, 11 Nov 2010 07:34:12 +0000 (07:34 +0000)
committerguy <guy@f5534014-38df-0310-8fa8-9805f1628bb7>
Thu, 11 Nov 2010 07:34:12 +0000 (07:34 +0000)
the BPF BIOCSRTIMEOUT bug in 64-bit mode, so we don't need to do our own
workaround in 10.6.5 or later.

git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@34841 f5534014-38df-0310-8fa8-9805f1628bb7

dumpcap.c

index 7c898fd7a413642be1877170d2672df3805df8c2..af4909ed11422e432dfe73a19a2b979c09b85fba 100644 (file)
--- a/dumpcap.c
+++ b/dumpcap.c
@@ -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