Bug 782815: optlen is of type socklen_t on Darwin and FreeBSD. The patch is
authorwtc%google.com
Fri, 14 Dec 2012 03:14:45 +0000
changeset 4430 83f95f5f5aad94d50893201d3e3a399eed7db171
parent 4429 f2c09c2b9db0514f7eda97d8881bd1c93ab4ab70
child 4431 edf241e0804078d07db81e8ff4a1142ad69f7644
push idunknown
push userunknown
push dateunknown
bugs782815
Bug 782815: optlen is of type socklen_t on Darwin and FreeBSD. The patch is contributed by Jan Beich <jbeich@tormail.org>. r=wtc.
pr/src/pthreads/ptio.c
--- a/pr/src/pthreads/ptio.c
+++ b/pr/src/pthreads/ptio.c
@@ -1145,17 +1145,17 @@ void _PR_InitIO(void)
      * 5.3 says.  So we have to turn it off.  Find out whether we
      * are running on such a system.
      */
     {
         int osfd;
         osfd = socket(AF_INET6, SOCK_STREAM, 0);
         if (osfd != -1) {
             int on;
-            int optlen = sizeof(on);
+            socklen_t optlen = sizeof(on);
             if (getsockopt(osfd, IPPROTO_IPV6, IPV6_V6ONLY,
                     &on, &optlen) == 0) {
                 _pr_ipv6_v6only_on_by_default = on;
             }
             close(osfd);
         }
     }
 #endif