Remove passcred
for emscripten
This commit is contained in:
parent
6b0c3dfe00
commit
e9bf69954c
3 changed files with 6 additions and 6 deletions
|
@ -757,7 +757,7 @@ impl UnixDatagram {
|
||||||
/// Ok(())
|
/// Ok(())
|
||||||
/// }
|
/// }
|
||||||
/// ```
|
/// ```
|
||||||
#[cfg(any(doc, target_os = "android", target_os = "emscripten", target_os = "linux",))]
|
#[cfg(any(doc, target_os = "android", target_os = "linux",))]
|
||||||
#[unstable(feature = "unix_socket_ancillary_data", issue = "76915")]
|
#[unstable(feature = "unix_socket_ancillary_data", issue = "76915")]
|
||||||
pub fn set_passcred(&self, passcred: bool) -> io::Result<()> {
|
pub fn set_passcred(&self, passcred: bool) -> io::Result<()> {
|
||||||
self.0.set_passcred(passcred)
|
self.0.set_passcred(passcred)
|
||||||
|
@ -769,7 +769,7 @@ impl UnixDatagram {
|
||||||
/// Get the socket option `SO_PASSCRED`.
|
/// Get the socket option `SO_PASSCRED`.
|
||||||
///
|
///
|
||||||
/// [`set_passcred`]: UnixDatagram::set_passcred
|
/// [`set_passcred`]: UnixDatagram::set_passcred
|
||||||
#[cfg(any(doc, target_os = "android", target_os = "emscripten", target_os = "linux",))]
|
#[cfg(any(doc, target_os = "android", target_os = "linux",))]
|
||||||
#[unstable(feature = "unix_socket_ancillary_data", issue = "76915")]
|
#[unstable(feature = "unix_socket_ancillary_data", issue = "76915")]
|
||||||
pub fn passcred(&self) -> io::Result<bool> {
|
pub fn passcred(&self) -> io::Result<bool> {
|
||||||
self.0.passcred()
|
self.0.passcred()
|
||||||
|
|
|
@ -375,7 +375,7 @@ impl UnixStream {
|
||||||
/// Ok(())
|
/// Ok(())
|
||||||
/// }
|
/// }
|
||||||
/// ```
|
/// ```
|
||||||
#[cfg(any(doc, target_os = "android", target_os = "emscripten", target_os = "linux",))]
|
#[cfg(any(doc, target_os = "android", target_os = "linux",))]
|
||||||
#[unstable(feature = "unix_socket_ancillary_data", issue = "76915")]
|
#[unstable(feature = "unix_socket_ancillary_data", issue = "76915")]
|
||||||
pub fn set_passcred(&self, passcred: bool) -> io::Result<()> {
|
pub fn set_passcred(&self, passcred: bool) -> io::Result<()> {
|
||||||
self.0.set_passcred(passcred)
|
self.0.set_passcred(passcred)
|
||||||
|
@ -387,7 +387,7 @@ impl UnixStream {
|
||||||
/// Get the socket option `SO_PASSCRED`.
|
/// Get the socket option `SO_PASSCRED`.
|
||||||
///
|
///
|
||||||
/// [`set_passcred`]: UnixStream::set_passcred
|
/// [`set_passcred`]: UnixStream::set_passcred
|
||||||
#[cfg(any(doc, target_os = "android", target_os = "emscripten", target_os = "linux",))]
|
#[cfg(any(doc, target_os = "android", target_os = "linux",))]
|
||||||
#[unstable(feature = "unix_socket_ancillary_data", issue = "76915")]
|
#[unstable(feature = "unix_socket_ancillary_data", issue = "76915")]
|
||||||
pub fn passcred(&self) -> io::Result<bool> {
|
pub fn passcred(&self) -> io::Result<bool> {
|
||||||
self.0.passcred()
|
self.0.passcred()
|
||||||
|
|
|
@ -341,12 +341,12 @@ impl Socket {
|
||||||
Ok(raw != 0)
|
Ok(raw != 0)
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(any(target_os = "android", target_os = "emscripten", target_os = "linux",))]
|
#[cfg(any(target_os = "android", target_os = "linux",))]
|
||||||
pub fn set_passcred(&self, passcred: bool) -> io::Result<()> {
|
pub fn set_passcred(&self, passcred: bool) -> io::Result<()> {
|
||||||
setsockopt(self, libc::SOL_SOCKET, libc::SO_PASSCRED, passcred as libc::c_int)
|
setsockopt(self, libc::SOL_SOCKET, libc::SO_PASSCRED, passcred as libc::c_int)
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(any(target_os = "android", target_os = "emscripten", target_os = "linux",))]
|
#[cfg(any(target_os = "android", target_os = "linux",))]
|
||||||
pub fn passcred(&self) -> io::Result<bool> {
|
pub fn passcred(&self) -> io::Result<bool> {
|
||||||
let passcred: libc::c_int = getsockopt(self, libc::SOL_SOCKET, libc::SO_PASSCRED)?;
|
let passcred: libc::c_int = getsockopt(self, libc::SOL_SOCKET, libc::SO_PASSCRED)?;
|
||||||
Ok(passcred != 0)
|
Ok(passcred != 0)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue