Library changes for Apple WatchOS
This commit is contained in:
@@ -90,6 +90,7 @@ pub mod thread;
|
||||
target_os = "dragonfly",
|
||||
target_os = "freebsd",
|
||||
target_os = "ios",
|
||||
target_os = "watchos",
|
||||
target_os = "macos",
|
||||
target_os = "netbsd",
|
||||
target_os = "openbsd"
|
||||
|
||||
@@ -12,6 +12,7 @@ use crate::os::unix::io::{AsFd, AsRawFd, BorrowedFd, FromRawFd, IntoRawFd, Owned
|
||||
target_os = "freebsd",
|
||||
target_os = "ios",
|
||||
target_os = "macos",
|
||||
target_os = "watchos",
|
||||
target_os = "netbsd",
|
||||
target_os = "openbsd"
|
||||
))]
|
||||
@@ -30,6 +31,7 @@ use crate::time::Duration;
|
||||
target_os = "freebsd",
|
||||
target_os = "ios",
|
||||
target_os = "macos",
|
||||
target_os = "watchos",
|
||||
target_os = "netbsd",
|
||||
target_os = "openbsd"
|
||||
))]
|
||||
@@ -238,6 +240,7 @@ impl UnixStream {
|
||||
target_os = "freebsd",
|
||||
target_os = "ios",
|
||||
target_os = "macos",
|
||||
target_os = "watchos",
|
||||
target_os = "netbsd",
|
||||
target_os = "openbsd"
|
||||
))]
|
||||
|
||||
@@ -36,7 +36,7 @@ pub use self::impl_linux::peer_cred;
|
||||
))]
|
||||
pub use self::impl_bsd::peer_cred;
|
||||
|
||||
#[cfg(any(target_os = "macos", target_os = "ios",))]
|
||||
#[cfg(any(target_os = "macos", target_os = "ios", target_os = "watchos"))]
|
||||
pub use self::impl_mac::peer_cred;
|
||||
|
||||
#[cfg(any(target_os = "linux", target_os = "android"))]
|
||||
@@ -97,7 +97,7 @@ pub mod impl_bsd {
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(any(target_os = "macos", target_os = "ios",))]
|
||||
#[cfg(any(target_os = "macos", target_os = "ios", target_os = "watchos"))]
|
||||
pub mod impl_mac {
|
||||
use super::UCred;
|
||||
use crate::os::unix::io::AsRawFd;
|
||||
|
||||
@@ -9,6 +9,7 @@ use libc::{getegid, geteuid, getpid};
|
||||
target_os = "freebsd",
|
||||
target_os = "ios",
|
||||
target_os = "macos",
|
||||
target_os = "watchos",
|
||||
target_os = "openbsd"
|
||||
))]
|
||||
fn test_socket_pair() {
|
||||
@@ -25,7 +26,7 @@ fn test_socket_pair() {
|
||||
}
|
||||
|
||||
#[test]
|
||||
#[cfg(any(target_os = "linux", target_os = "ios", target_os = "macos",))]
|
||||
#[cfg(any(target_os = "linux", target_os = "ios", target_os = "macos", target_os = "watchos"))]
|
||||
fn test_socket_pair_pids(arg: Type) -> RetType {
|
||||
// Create two connected sockets and get their peer credentials.
|
||||
let (sock_a, sock_b) = UnixStream::pair().unwrap();
|
||||
|
||||
Reference in New Issue
Block a user