summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CHANGELOG.md3
-rw-r--r--src/sys/socket/addr.rs7
2 files changed, 9 insertions, 1 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 5423514b..4794c11c 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 7037ae47..27883254 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<SockAddr> {
+ ///
+ /// # 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<SockAddr> {
if addr.is_null() {
None
} else {