diff --git a/CHANGELOG.md b/CHANGELOG.md index 5423514b3c..4794c11c9f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -44,6 +44,9 @@ This project adheres to [Semantic Versioning](http://semver.org/). ### Removed +- Removed `sys::socket::addr::from_libc_sockaddr` from the public API. + (#[1215](https://github.com/nix-rust/nix/pull/1215)) + ## [0.17.0] - 3 February 2020 ### Added - Add `CLK_TCK` to `SysconfVar` diff --git a/src/sys/socket/addr.rs b/src/sys/socket/addr.rs index 7037ae4765..27883254cd 100644 --- a/src/sys/socket/addr.rs +++ b/src/sys/socket/addr.rs @@ -714,7 +714,12 @@ impl SockAddr { /// /// Supports only the following address families: Unix, Inet (v4 & v6), Netlink and System. /// Returns None for unsupported families. - pub unsafe fn from_libc_sockaddr(addr: *const libc::sockaddr) -> Option { + /// + /// # Safety + /// + /// unsafe because it takes a raw pointer as argument. The caller must + /// ensure that the pointer is valid. + pub(crate) unsafe fn from_libc_sockaddr(addr: *const libc::sockaddr) -> Option { if addr.is_null() { None } else {