summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CHANGELOG.md3
-rw-r--r--src/sys/ioctl/mod.rs2
2 files changed, 4 insertions, 1 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 0e44306f..c0fb9e21 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -23,6 +23,9 @@ This project adheres to [Semantic Versioning](http://semver.org/).
([#614](https://github.com/nix-rust/nix/pull/614))
### Changed
+- Changed ioctl! write to take argument by value instead as pointer.
+ If you need a pointer as argument, use ioctl! write buf.
+ ([#626](https://github.com/nix-rust/nix/pull/626))
- Marked `sys::mman::{ mmap, munmap, madvise, munlock, msync }` as unsafe.
([#559](https://github.com/nix-rust/nix/pull/559))
- Minimum supported Rust version is now 1.13
diff --git a/src/sys/ioctl/mod.rs b/src/sys/ioctl/mod.rs
index 0a95ec77..48b3827b 100644
--- a/src/sys/ioctl/mod.rs
+++ b/src/sys/ioctl/mod.rs
@@ -158,7 +158,7 @@ macro_rules! ioctl {
);
(write $name:ident with $ioty:expr, $nr:expr; $ty:ty) => (
pub unsafe fn $name(fd: $crate::sys::ioctl::libc::c_int,
- val: *const $ty)
+ val: $ty)
-> $crate::Result<$crate::sys::ioctl::libc::c_int> {
convert_ioctl_res!($crate::sys::ioctl::ioctl(fd, iow!($ioty, $nr, ::std::mem::size_of::<$ty>()) as $crate::sys::ioctl::libc::c_ulong, val))
}