summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CHANGELOG.md2
-rw-r--r--src/sys/uio.rs5
2 files changed, 7 insertions, 0 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md
index c1f06dd6..63bb7440 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -8,6 +8,8 @@ This project adheres to [Semantic Versioning](https://semver.org/).
- Added `fexecve` on DragonFly.
(#[1577](https://github.com/nix-rust/nix/pull/1577))
+- `sys::uio::IoVec` is now `Send` and `Sync`
+ (#[1582](https://github.com/nix-rust/nix/pull/1582))
- Added fine-grained features flags. Most Nix functionality can now be
conditionally enabled. By default, all features are enabled.
(#[1611](https://github.com/nix-rust/nix/pull/1611))
diff --git a/src/sys/uio.rs b/src/sys/uio.rs
index 52324020..125c2e6c 100644
--- a/src/sys/uio.rs
+++ b/src/sys/uio.rs
@@ -228,3 +228,8 @@ impl<'a> IoVec<&'a mut [u8]> {
}, PhantomData)
}
}
+
+// The only reason IoVec isn't automatically Send+Sync is because libc::iovec
+// contains raw pointers.
+unsafe impl<T> Send for IoVec<T> where T: Send {}
+unsafe impl<T> Sync for IoVec<T> where T: Sync {}