Skip to content

Commit 9503b13

Browse files
committed
std: Fix IPV6 imports for solaris
Like BSDs, Solaris maps `IPV6_ADD_MEMBERSHIP` and `IPV6_DROP_MEMBERSHIP` from `IPV6_JOIN_GROUP` and `IPV6_LEAVE_GROUP` respectively.
1 parent ef1bd08 commit 9503b13

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

src/libstd/sys/common/net.rs

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,19 +25,23 @@ use time::Duration;
2525

2626
#[cfg(any(target_os = "dragonfly", target_os = "freebsd",
2727
target_os = "ios", target_os = "macos",
28-
target_os = "openbsd", target_os = "netbsd"))]
28+
target_os = "openbsd", target_os = "netbsd",
29+
target_os = "solaris"))]
2930
use sys::net::netc::IPV6_JOIN_GROUP as IPV6_ADD_MEMBERSHIP;
3031
#[cfg(not(any(target_os = "dragonfly", target_os = "freebsd",
3132
target_os = "ios", target_os = "macos",
32-
target_os = "openbsd", target_os = "netbsd")))]
33+
target_os = "openbsd", target_os = "netbsd",
34+
target_os = "solaris")))]
3335
use sys::net::netc::IPV6_ADD_MEMBERSHIP;
3436
#[cfg(any(target_os = "dragonfly", target_os = "freebsd",
3537
target_os = "ios", target_os = "macos",
36-
target_os = "openbsd", target_os = "netbsd"))]
38+
target_os = "openbsd", target_os = "netbsd",
39+
target_os = "solaris"))]
3740
use sys::net::netc::IPV6_LEAVE_GROUP as IPV6_DROP_MEMBERSHIP;
3841
#[cfg(not(any(target_os = "dragonfly", target_os = "freebsd",
3942
target_os = "ios", target_os = "macos",
40-
target_os = "openbsd", target_os = "netbsd")))]
43+
target_os = "openbsd", target_os = "netbsd",
44+
target_os = "solaris")))]
4145
use sys::net::netc::IPV6_DROP_MEMBERSHIP;
4246

4347
////////////////////////////////////////////////////////////////////////////////

0 commit comments

Comments
 (0)