Skip to content

Commit 0d35261

Browse files
committed
x/net/ipv4: don't enable advanced features on OS X 10.7 and below
Looks like OS X 10.8 is the safe harbor. LGTM=iant R=iant CC=golang-codereviews https://golang.org/cl/167630043
1 parent 153a6a6 commit 0d35261

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

ipv4/sys_darwin.go

+5-3
Original file line numberDiff line numberDiff line change
@@ -47,9 +47,11 @@ func init() {
4747
continue
4848
}
4949
}
50-
// The IP_PKTINFO was introduced in OS X 10.7 (Darwin
51-
// 11.0.0). See http://support.apple.com/kb/HT1633.
52-
if i > 2 || i == 2 && osver[0] >= '1' && osver[1] >= '1' {
50+
// The IP_PKTINFO and protocol-independent multicast API were
51+
// introduced in OS X 10.7 (Darwin 11.0.0). But it looks like
52+
// those features require OS X 10.8 (Darwin 12.0.0) and above.
53+
// See http://support.apple.com/kb/HT1633.
54+
if i > 2 || i == 2 && osver[0] >= '1' && osver[1] >= '2' {
5355
ctlOpts[ctlPacketInfo].name = sysIP_PKTINFO
5456
ctlOpts[ctlPacketInfo].length = sysSizeofInetPktinfo
5557
ctlOpts[ctlPacketInfo].marshal = marshalPacketInfo

0 commit comments

Comments
 (0)