changeset 4665:d2494547f2d7

7127771: (macosx)test/java/net/Socket/TrafficClass.java fails on Mac OS X Reviewed-by: michaelm, alanb, phh
author khazra
date Thu, 19 Jan 2012 14:42:36 +0000
parents dfa991721457
children 2a8bd80fe31d
files src/solaris/native/java/net/net_util_md.c
diffstat 1 files changed, 4 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/src/solaris/native/java/net/net_util_md.c	Wed Jan 18 20:49:02 2012 +0400
+++ b/src/solaris/native/java/net/net_util_md.c	Thu Jan 19 14:42:36 2012 +0000
@@ -1301,9 +1301,9 @@
 
     /*
      * IPPROTO/IP_TOS :-
-     * 1. IPv6 on Solaris: no-op and will be set in flowinfo
-     *    field when connecting TCP socket, or sending
-     *    UDP packet.
+     * 1. IPv6 on Solaris/Mac OS: no-op and will be set
+     *    in flowinfo field when connecting TCP socket,
+     *    or sending UDP packet.
      * 2. IPv6 on Linux: By default Linux ignores flowinfo
      *    field so enable IPV6_FLOWINFO_SEND so that flowinfo
      *    will be examined.
@@ -1313,7 +1313,7 @@
     if (level == IPPROTO_IP && opt == IP_TOS) {
         int *iptos;
 
-#if defined(AF_INET6) && defined(__solaris__)
+#if defined(AF_INET6) && (defined(__solaris__) || defined(MACOSX))
         if (ipv6_available()) {
             return 0;
         }
@@ -1331,10 +1331,6 @@
         *iptos &= (IPTOS_TOS_MASK | IPTOS_PREC_MASK);
     }
 
-#if defined(AF_INET6) && defined(_ALLBSD_SOURCE)
-// XXXBSD: to be implemented ?
-#endif
-
     /*
      * SOL_SOCKET/{SO_SNDBUF,SO_RCVBUF} - On Solaris we may need to clamp
      * the value when it exceeds the system limit.