From c4257f8a76b69b0d2e9a001d83e4bef67c03b23f Mon Sep 17 00:00:00 2001 From: arthurprs Date: Tue, 29 Dec 2015 12:50:09 +0000 Subject: improve bsd unixes ipv6 support --- src/sys/socket/consts.rs | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) (limited to 'src/sys/socket/consts.rs') diff --git a/src/sys/socket/consts.rs b/src/sys/socket/consts.rs index 4b5f7092..5cb69202 100644 --- a/src/sys/socket/consts.rs +++ b/src/sys/socket/consts.rs @@ -204,16 +204,10 @@ mod os { pub const IP_ADD_MEMBERSHIP: c_int = 12; pub const IP_DROP_MEMBERSHIP: c_int = 13; - #[cfg(not(any(target_os = "macos", target_os = "ios", target_os = "netbsd", target_os = "dragonfly", target_os = "freebsd")))] - pub const IPV6_ADD_MEMBERSHIP: c_int = libc::IPV6_ADD_MEMBERSHIP; - #[cfg(not(any(target_os = "macos", target_os = "ios", target_os = "netbsd", target_os = "dragonfly", target_os = "freebsd")))] - pub const IPV6_DROP_MEMBERSHIP: c_int = libc::IPV6_DROP_MEMBERSHIP; - - #[cfg(target_os = "netbsd")] - pub const IPV6_JOIN_GROUP: c_int = 12; - - #[cfg(target_os = "netbsd")] - pub const IPV6_LEAVE_GROUP: c_int = 13; + #[cfg(not(target_os = "openbsd"))] + pub const IPV6_JOIN_GROUP: c_int = libc::IPV6_JOIN_GROUP; + #[cfg(not(target_os = "openbsd"))] + pub const IPV6_LEAVE_GROUP: c_int = libc::IPV6_LEAVE_GROUP; pub type InAddrT = u32; @@ -295,6 +289,8 @@ mod os { pub const IP_MULTICAST_LOOP: c_int = 11; pub const IP_ADD_MEMBERSHIP: c_int = 12; pub const IP_DROP_MEMBERSHIP: c_int = 13; + pub const IPV6_JOIN_GROUP: c_int = libc::IPV6_JOIN_GROUP; + pub const IPV6_LEAVE_GROUP: c_int = libc::IPV6_LEAVE_GROUP; pub type InAddrT = u32; -- cgit v1.2.3