1# Change Log 2 3All notable changes to this project will be documented in this file. 4This project adheres to [Semantic Versioning](http://semver.org/). 5 6## [Unreleased] 7### Added 8### Changed 9### Fixed 10### Removed 11 12## [0.14.1] - 2019-06-06 13### Added 14- Macros exported by `nix` may now be imported via `use` on the Rust 2018 15 edition without importing helper macros on Linux targets. 16 ([#1066](https://github.com/nix-rust/nix/pull/1066)) 17 18 For example, in Rust 2018, the `ioctl_read_bad!` macro can now be imported 19 without importing the `convert_ioctl_res!` macro. 20 21 ```rust 22 use nix::ioctl_read_bad; 23 24 ioctl_read_bad!(tcgets, libc::TCGETS, libc::termios); 25 ``` 26 27### Changed 28- Changed some public types from reexports of libc types like `uint32_t` to the 29 native equivalents like `u32.` 30 ([#1072](https://github.com/nix-rust/nix/pull/1072/commits)) 31 32### Fixed 33- Fix the build on Android and Linux/mips with recent versions of libc. 34 ([#1072](https://github.com/nix-rust/nix/pull/1072/commits)) 35 36### Removed 37 38## [0.14.0] - 2019-05-21 39### Added 40- Add IP_RECVIF & IP_RECVDSTADDR. Enable IP_PKTINFO and IP6_PKTINFO on netbsd/openbsd. 41 ([#1002](https://github.com/nix-rust/nix/pull/1002)) 42- Added `inotify_init1`, `inotify_add_watch` and `inotify_rm_watch` wrappers for 43 Android and Linux. ([#1016](https://github.com/nix-rust/nix/pull/1016)) 44- Add `ALG_SET_IV`, `ALG_SET_OP` and `ALG_SET_AEAD_ASSOCLEN` control messages and `AF_ALG` 45 socket types on Linux and Android ([#1031](https://github.com/nix-rust/nix/pull/1031)) 46- Add killpg 47 ([#1034](https://github.com/nix-rust/nix/pull/1034)) 48- Added ENOTSUP errno support for Linux and Android. 49 ([#969](https://github.com/nix-rust/nix/pull/969)) 50- Add several errno constants from OpenBSD 6.2 51 ([#1036](https://github.com/nix-rust/nix/pull/1036)) 52- Added `from_std` and `to_std` methods for `sys::socket::IpAddr` 53 ([#1043](https://github.com/nix-rust/nix/pull/1043)) 54- Added `nix::unistd:seteuid` and `nix::unistd::setegid` for those platforms that do 55 not support `setresuid` nor `setresgid` respectively. 56 ([#1044](https://github.com/nix-rust/nix/pull/1044)) 57- Added a `access` wrapper 58 ([#1045](https://github.com/nix-rust/nix/pull/1045)) 59- Add `forkpty` 60 ([#1042](https://github.com/nix-rust/nix/pull/1042)) 61- Add `sched_yield` 62 ([#1050](https://github.com/nix-rust/nix/pull/1050)) 63 64### Changed 65- `PollFd` event flags renamed to `PollFlags` ([#1024](https://github.com/nix-rust/nix/pull/1024/)) 66- `recvmsg` now returns an Iterator over `ControlMessageOwned` objects rather 67 than `ControlMessage` objects. This is sadly not backwards-compatible. Fix 68 code like this: 69 ```rust 70 if let ControlMessage::ScmRights(&fds) = cmsg { 71 ``` 72 73 By replacing it with code like this: 74 ```rust 75 if let ControlMessageOwned::ScmRights(fds) = cmsg { 76 ``` 77 ([#1020](https://github.com/nix-rust/nix/pull/1020)) 78- Replaced `CmsgSpace` with the `cmsg_space` macro. 79 ([#1020](https://github.com/nix-rust/nix/pull/1020)) 80 81### Fixed 82- Fixed multiple bugs when using `sendmsg` and `recvmsg` with ancillary control messages 83 ([#1020](https://github.com/nix-rust/nix/pull/1020)) 84- Macros exported by `nix` may now be imported via `use` on the Rust 2018 85 edition without importing helper macros for BSD targets. 86 ([#1041](https://github.com/nix-rust/nix/pull/1041)) 87 88 For example, in Rust 2018, the `ioctl_read_bad!` macro can now be imported 89 without importing the `convert_ioctl_res!` macro. 90 91 ```rust 92 use nix::ioctl_read_bad; 93 94 ioctl_read_bad!(tcgets, libc::TCGETS, libc::termios); 95 ``` 96 97### Removed 98- `Daemon`, `NOTE_REAP`, and `NOTE_EXIT_REPARENTED` are now deprecated on OSX 99 and iOS. 100 ([#1033](https://github.com/nix-rust/nix/pull/1033)) 101- `PTRACE_GETREGS`, `PTRACE_SETREGS`, `PTRACE_GETFPREGS`, and 102 `PTRACE_SETFPREGS` have been removed from some platforms where they never 103 should've been defined in the first place. 104 ([#1055](https://github.com/nix-rust/nix/pull/1055)) 105 106## [0.13.0] - 2019-01-15 107### Added 108- Added PKTINFO(V4) & V6PKTINFO cmsg support - Android/FreeBSD/iOS/Linux/MacOS. 109 ([#990](https://github.com/nix-rust/nix/pull/990)) 110- Added support of CString type in `setsockopt`. 111 ([#972](https://github.com/nix-rust/nix/pull/972)) 112- Added option `TCP_CONGESTION` in `setsockopt`. 113 ([#972](https://github.com/nix-rust/nix/pull/972)) 114- Added `symlinkat` wrapper. 115 ([#997](https://github.com/nix-rust/nix/pull/997)) 116- Added `ptrace::{getregs, setregs}`. 117 ([#1010](https://github.com/nix-rust/nix/pull/1010)) 118- Added `nix::sys::signal::signal`. 119 ([#817](https://github.com/nix-rust/nix/pull/817)) 120- Added an `mprotect` wrapper. 121 ([#991](https://github.com/nix-rust/nix/pull/991)) 122 123### Changed 124### Fixed 125- `lutimes` never worked on OpenBSD as it is not implemented on OpenBSD. It has 126 been removed. ([#1000](https://github.com/nix-rust/nix/pull/1000)) 127- `fexecve` never worked on NetBSD or on OpenBSD as it is not implemented on 128 either OS. It has been removed. ([#1000](https://github.com/nix-rust/nix/pull/1000)) 129 130### Removed 131 132## [0.12.0] 2018-11-28 133 134### Added 135- Added `FromStr` and `Display` impls for `nix::sys::Signal` 136 ([#884](https://github.com/nix-rust/nix/pull/884)) 137- Added a `sync` wrapper. 138 ([#961](https://github.com/nix-rust/nix/pull/961)) 139- Added a `sysinfo` wrapper. 140 ([#922](https://github.com/nix-rust/nix/pull/922)) 141- Support the `SO_PEERCRED` socket option and the `UnixCredentials` type on all Linux and Android targets. 142 ([#921](https://github.com/nix-rust/nix/pull/921)) 143- Added support for `SCM_CREDENTIALS`, allowing to send process credentials over Unix sockets. 144 ([#923](https://github.com/nix-rust/nix/pull/923)) 145- Added a `dir` module for reading directories (wraps `fdopendir`, `readdir`, and `rewinddir`). 146 ([#916](https://github.com/nix-rust/nix/pull/916)) 147- Added `kmod` module that allows loading and unloading kernel modules on Linux. 148 ([#930](https://github.com/nix-rust/nix/pull/930)) 149- Added `futimens` and `utimesat` wrappers ([#944](https://github.com/nix-rust/nix/pull/944)), 150 an `lutimes` wrapper ([#967](https://github.com/nix-rust/nix/pull/967)), 151 and a `utimes` wrapper ([#946](https://github.com/nix-rust/nix/pull/946)). 152- Added `AF_UNSPEC` wrapper to `AddressFamily` ([#948](https://github.com/nix-rust/nix/pull/948)) 153- Added the `mode_t` public alias within `sys::stat`. 154 ([#954](https://github.com/nix-rust/nix/pull/954)) 155- Added a `truncate` wrapper. 156 ([#956](https://github.com/nix-rust/nix/pull/956)) 157- Added a `fchownat` wrapper. 158 ([#955](https://github.com/nix-rust/nix/pull/955)) 159- Added support for `ptrace` on BSD operating systems ([#949](https://github.com/nix-rust/nix/pull/949)) 160- Added `ptrace` functions for reads and writes to tracee memory and ptrace kill 161 ([#949](https://github.com/nix-rust/nix/pull/949)) ([#958](https://github.com/nix-rust/nix/pull/958)) 162- Added a `acct` wrapper module for enabling and disabling process accounting 163 ([#952](https://github.com/nix-rust/nix/pull/952)) 164- Added the `time_t` and `suseconds_t` public aliases within `sys::time`. 165 ([#968](https://github.com/nix-rust/nix/pull/968)) 166- Added `unistd::execvpe` for Haiku, Linux and OpenBSD 167 ([#975](https://github.com/nix-rust/nix/pull/975)) 168- Added `Error::as_errno`. 169 ([#977](https://github.com/nix-rust/nix/pull/977)) 170 171### Changed 172- Increased required Rust version to 1.24.1 173 ([#900](https://github.com/nix-rust/nix/pull/900)) 174 ([#966](https://github.com/nix-rust/nix/pull/966)) 175 176### Fixed 177- Made `preadv` take immutable slice of IoVec. 178 ([#914](https://github.com/nix-rust/nix/pull/914)) 179- Fixed passing multiple file descriptors over Unix Sockets. 180 ([#918](https://github.com/nix-rust/nix/pull/918)) 181 182### Removed 183 184## [0.11.0] 2018-06-01 185 186### Added 187- Added `sendfile` on FreeBSD and Darwin. 188 ([#901](https://github.com/nix-rust/nix/pull/901)) 189- Added `pselect` 190 ([#894](https://github.com/nix-rust/nix/pull/894)) 191- Exposed `preadv` and `pwritev` on the BSDs. 192 ([#883](https://github.com/nix-rust/nix/pull/883)) 193- Added `mlockall` and `munlockall` 194 ([#876](https://github.com/nix-rust/nix/pull/876)) 195- Added `SO_MARK` on Linux. 196 ([#873](https://github.com/nix-rust/nix/pull/873)) 197- Added safe support for nearly any buffer type in the `sys::aio` module. 198 ([#872](https://github.com/nix-rust/nix/pull/872)) 199- Added `sys::aio::LioCb` as a wrapper for `libc::lio_listio`. 200 ([#872](https://github.com/nix-rust/nix/pull/872)) 201- Added `unistd::getsid` 202 ([#850](https://github.com/nix-rust/nix/pull/850)) 203- Added `alarm`. ([#830](https://github.com/nix-rust/nix/pull/830)) 204- Added interface flags `IFF_NO_PI, IFF_TUN, IFF_TAP` on linux-like systems. 205 ([#853](https://github.com/nix-rust/nix/pull/853)) 206- Added `statvfs` module to all MacOS and Linux architectures. 207 ([#832](https://github.com/nix-rust/nix/pull/832)) 208- Added `EVFILT_EMPTY`, `EVFILT_PROCDESC`, and `EVFILT_SENDFILE` on FreeBSD. 209 ([#825](https://github.com/nix-rust/nix/pull/825)) 210- Exposed `termios::cfmakesane` on FreeBSD. 211 ([#825](https://github.com/nix-rust/nix/pull/825)) 212- Exposed `MSG_CMSG_CLOEXEC` on *BSD. 213 ([#825](https://github.com/nix-rust/nix/pull/825)) 214- Added `fchmod`, `fchmodat`. 215 ([#857](https://github.com/nix-rust/nix/pull/857)) 216- Added `request_code_write_int!` on FreeBSD/DragonFlyBSD 217 ([#833](https://github.com/nix-rust/nix/pull/833)) 218 219### Changed 220- `Display` and `Debug` for `SysControlAddr` now includes all fields. 221 ([#837](https://github.com/nix-rust/nix/pull/837)) 222- `ioctl!` has been replaced with a family of `ioctl_*!` macros. 223 ([#833](https://github.com/nix-rust/nix/pull/833)) 224- `io!`, `ior!`, `iow!`, and `iorw!` has been renamed to `request_code_none!`, `request_code_read!`, 225 `request_code_write!`, and `request_code_readwrite!` respectively. These have also now been exposed 226 in the documentation. 227 ([#833](https://github.com/nix-rust/nix/pull/833)) 228- Enabled more `ptrace::Request` definitions for uncommon Linux platforms 229 ([#892](https://github.com/nix-rust/nix/pull/892)) 230- Emulation of `FD_CLOEXEC` and `O_NONBLOCK` was removed from `socket()`, `accept4()`, and 231 `socketpair()`. 232 ([#907](https://github.com/nix-rust/nix/pull/907)) 233 234### Fixed 235- Fixed possible panics when using `SigAction::flags` on Linux 236 ([#869](https://github.com/nix-rust/nix/pull/869)) 237- Properly exposed 460800 and 921600 baud rates on NetBSD 238 ([#837](https://github.com/nix-rust/nix/pull/837)) 239- Fixed `ioctl_write_int!` on FreeBSD/DragonFlyBSD 240 ([#833](https://github.com/nix-rust/nix/pull/833)) 241- `ioctl_write_int!` now properly supports passing a `c_ulong` as the parameter on Linux non-musl targets 242 ([#833](https://github.com/nix-rust/nix/pull/833)) 243 244### Removed 245- Removed explicit support for the `bytes` crate from the `sys::aio` module. 246 See `sys::aio::AioCb::from_boxed_slice` examples for alternatives. 247 ([#872](https://github.com/nix-rust/nix/pull/872)) 248- Removed `sys::aio::lio_listio`. Use `sys::aio::LioCb::listio` instead. 249 ([#872](https://github.com/nix-rust/nix/pull/872)) 250- Removed emulated `accept4()` from macos, ios, and netbsd targets 251 ([#907](https://github.com/nix-rust/nix/pull/907)) 252- Removed `IFF_NOTRAILERS` on OpenBSD, as it has been removed in OpenBSD 6.3 253 ([#893](https://github.com/nix-rust/nix/pull/893)) 254 255## [0.10.0] 2018-01-26 256 257### Added 258- Added specialized wrapper: `sys::ptrace::step` 259 ([#852](https://github.com/nix-rust/nix/pull/852)) 260- Added `AioCb::from_ptr` and `AioCb::from_mut_ptr` 261 ([#820](https://github.com/nix-rust/nix/pull/820)) 262- Added specialized wrappers: `sys::ptrace::{traceme, syscall, cont, attach}`. Using the matching routines 263 with `sys::ptrace::ptrace` is now deprecated. 264- Added `nix::poll` module for all platforms 265 ([#672](https://github.com/nix-rust/nix/pull/672)) 266- Added `nix::ppoll` function for FreeBSD and DragonFly 267 ([#672](https://github.com/nix-rust/nix/pull/672)) 268- Added protocol families in `AddressFamily` enum. 269 ([#647](https://github.com/nix-rust/nix/pull/647)) 270- Added the `pid()` method to `WaitStatus` for extracting the PID. 271 ([#722](https://github.com/nix-rust/nix/pull/722)) 272- Added `nix::unistd:fexecve`. 273 ([#727](https://github.com/nix-rust/nix/pull/727)) 274- Expose `uname()` on all platforms. 275 ([#739](https://github.com/nix-rust/nix/pull/739)) 276- Expose `signalfd` module on Android as well. 277 ([#739](https://github.com/nix-rust/nix/pull/739)) 278- Added `nix::sys::ptrace::detach`. 279 ([#749](https://github.com/nix-rust/nix/pull/749)) 280- Added timestamp socket control message variant: 281 `nix::sys::socket::ControlMessage::ScmTimestamp` 282 ([#663](https://github.com/nix-rust/nix/pull/663)) 283- Added socket option variant that enables the timestamp socket 284 control message: `nix::sys::socket::sockopt::ReceiveTimestamp` 285 ([#663](https://github.com/nix-rust/nix/pull/663)) 286- Added more accessor methods for `AioCb` 287 ([#773](https://github.com/nix-rust/nix/pull/773)) 288- Add `nix::sys::fallocate` 289 ([#768](https:://github.com/nix-rust/nix/pull/768)) 290- Added `nix::unistd::mkfifo`. 291 ([#602](https://github.com/nix-rust/nix/pull/774)) 292- Added `ptrace::Options::PTRACE_O_EXITKILL` on Linux and Android. 293 ([#771](https://github.com/nix-rust/nix/pull/771)) 294- Added `nix::sys::uio::{process_vm_readv, process_vm_writev}` on Linux 295 ([#568](https://github.com/nix-rust/nix/pull/568)) 296- Added `nix::unistd::{getgroups, setgroups, getgrouplist, initgroups}`. ([#733](https://github.com/nix-rust/nix/pull/733)) 297- Added `nix::sys::socket::UnixAddr::as_abstract` on Linux and Android. 298 ([#785](https://github.com/nix-rust/nix/pull/785)) 299- Added `nix::unistd::execveat` on Linux and Android. 300 ([#800](https://github.com/nix-rust/nix/pull/800)) 301- Added the `from_raw()` method to `WaitStatus` for converting raw status values 302 to `WaitStatus` independent of syscalls. 303 ([#741](https://github.com/nix-rust/nix/pull/741)) 304- Added more standard trait implementations for various types. 305 ([#814](https://github.com/nix-rust/nix/pull/814)) 306- Added `sigprocmask` to the signal module. 307 ([#826](https://github.com/nix-rust/nix/pull/826)) 308- Added `nix::sys::socket::LinkAddr` on Linux and all bsdlike system. 309 ([#813](https://github.com/nix-rust/nix/pull/813)) 310- Add socket options for `IP_TRANSPARENT` / `BIND_ANY`. 311 ([#835](https://github.com/nix-rust/nix/pull/835)) 312 313### Changed 314- Exposed the `mqueue` module for all supported operating systems. 315 ([#834](https://github.com/nix-rust/nix/pull/834)) 316- Use native `pipe2` on all BSD targets. Users should notice no difference. 317 ([#777](https://github.com/nix-rust/nix/pull/777)) 318- Renamed existing `ptrace` wrappers to encourage namespacing ([#692](https://github.com/nix-rust/nix/pull/692)) 319- Marked `sys::ptrace::ptrace` as `unsafe`. 320- Changed function signature of `socket()` and `socketpair()`. The `protocol` argument 321 has changed type from `c_int` to `SockProtocol`. 322 It accepts a `None` value for default protocol that was specified with zero using `c_int`. 323 ([#647](https://github.com/nix-rust/nix/pull/647)) 324- Made `select` easier to use, adding the ability to automatically calculate the `nfds` parameter using the new 325 `FdSet::highest` ([#701](https://github.com/nix-rust/nix/pull/701)) 326- Exposed `unistd::setresuid` and `unistd::setresgid` on FreeBSD and OpenBSD 327 ([#721](https://github.com/nix-rust/nix/pull/721)) 328- Refactored the `statvfs` module removing extraneous API functions and the 329 `statvfs::vfs` module. Additionally `(f)statvfs()` now return the struct 330 directly. And the returned `Statvfs` struct now exposes its data through 331 accessor methods. ([#729](https://github.com/nix-rust/nix/pull/729)) 332- The `addr` argument to `madvise` and `msync` is now `*mut` to better match the 333 libc API. ([#731](https://github.com/nix-rust/nix/pull/731)) 334- `shm_open` and `shm_unlink` are no longer exposed on Android targets, where 335 they are not officially supported. ([#731](https://github.com/nix-rust/nix/pull/731)) 336- `MapFlags`, `MmapAdvise`, and `MsFlags` expose some more variants and only 337 officially-supported variants are provided for each target. 338 ([#731](https://github.com/nix-rust/nix/pull/731)) 339- Marked `pty::ptsname` function as `unsafe` 340 ([#744](https://github.com/nix-rust/nix/pull/744)) 341- Moved constants ptrace request, event and options to enums and updated ptrace functions and argument types accordingly. 342 ([#749](https://github.com/nix-rust/nix/pull/749)) 343- `AioCb::Drop` will now panic if the `AioCb` is still in-progress ([#715](https://github.com/nix-rust/nix/pull/715)) 344- Restricted `nix::sys::socket::UnixAddr::new_abstract` to Linux and Android only. 345 ([#785](https://github.com/nix-rust/nix/pull/785)) 346- The `ucred` struct has been removed in favor of a `UserCredentials` struct that 347 contains only getters for its fields. 348 ([#814](https://github.com/nix-rust/nix/pull/814)) 349- Both `ip_mreq` and `ipv6_mreq` have been replaced with `IpMembershipRequest` and 350 `Ipv6MembershipRequest`. 351 ([#814](https://github.com/nix-rust/nix/pull/814)) 352- Removed return type from `pause`. 353 ([#829](https://github.com/nix-rust/nix/pull/829)) 354- Changed the termios APIs to allow for using a `u32` instead of the `BaudRate` 355 enum on BSD platforms to support arbitrary baud rates. See the module docs for 356 `nix::sys::termios` for more details. 357 ([#843](https://github.com/nix-rust/nix/pull/843)) 358 359### Fixed 360- Fix compilation and tests for OpenBSD targets 361 ([#688](https://github.com/nix-rust/nix/pull/688)) 362- Fixed error handling in `AioCb::fsync`, `AioCb::read`, and `AioCb::write`. 363 It is no longer an error to drop an `AioCb` that failed to enqueue in the OS. 364 ([#715](https://github.com/nix-rust/nix/pull/715)) 365- Fix potential memory corruption on non-Linux platforms when using 366 `sendmsg`/`recvmsg`, caused by mismatched `msghdr` definition. 367 ([#648](https://github.com/nix-rust/nix/pull/648)) 368 369### Removed 370- `AioCb::from_boxed_slice` has been removed. It was never actually safe. Use 371 `from_bytes` or `from_bytes_mut` instead. 372 ([#820](https://github.com/nix-rust/nix/pull/820)) 373- The syscall module has been removed. This only exposed enough functionality for 374 `memfd_create()` and `pivot_root()`, which are still exposed as separate functions. 375 ([#747](https://github.com/nix-rust/nix/pull/747)) 376- The `Errno` variants are no longer reexported from the `errno` module. `Errno` itself is no longer reexported from the 377 crate root and instead must be accessed using the `errno` module. ([#696](https://github.com/nix-rust/nix/pull/696)) 378- Removed `MS_VERBOSE`, `MS_NOSEC`, and `MS_BORN` from `MsFlags`. These 379 are internal kernel flags and should never have been exposed. 380 ([#814](https://github.com/nix-rust/nix/pull/814)) 381 382 383## [0.9.0] 2017-07-23 384 385### Added 386- Added `sysconf`, `pathconf`, and `fpathconf` 387 ([#630](https://github.com/nix-rust/nix/pull/630) 388- Added `sys::signal::SigAction::{ flags, mask, handler}` 389 ([#611](https://github.com/nix-rust/nix/pull/609) 390- Added `nix::sys::pthread::pthread_self` 391 ([#591](https://github.com/nix-rust/nix/pull/591) 392- Added `AioCb::from_boxed_slice` 393 ([#582](https://github.com/nix-rust/nix/pull/582) 394- Added `nix::unistd::{openat, fstatat, readlink, readlinkat}` 395 ([#551](https://github.com/nix-rust/nix/pull/551)) 396- Added `nix::pty::{grantpt, posix_openpt, ptsname/ptsname_r, unlockpt}` 397 ([#556](https://github.com/nix-rust/nix/pull/556) 398- Added `nix::ptr::openpty` 399 ([#456](https://github.com/nix-rust/nix/pull/456)) 400- Added `nix::ptrace::{ptrace_get_data, ptrace_getsiginfo, ptrace_setsiginfo 401 and nix::Error::UnsupportedOperation}` 402 ([#614](https://github.com/nix-rust/nix/pull/614)) 403- Added `cfmakeraw`, `cfsetspeed`, and `tcgetsid`. ([#527](https://github.com/nix-rust/nix/pull/527)) 404- Added "bad none", "bad write_ptr", "bad write_int", and "bad readwrite" variants to the `ioctl!` 405 macro. ([#670](https://github.com/nix-rust/nix/pull/670)) 406- On Linux and Android, added support for receiving `PTRACE_O_TRACESYSGOOD` 407 events from `wait` and `waitpid` using `WaitStatus::PtraceSyscall` 408 ([#566](https://github.com/nix-rust/nix/pull/566)). 409 410### Changed 411- The `ioctl!` macro and its variants now allow the generated functions to have 412 doccomments. ([#661](https://github.com/nix-rust/nix/pull/661)) 413- Changed `ioctl!(write ...)` into `ioctl!(write_ptr ...)` and `ioctl!(write_int ..)` variants 414 to more clearly separate those use cases. ([#670](https://github.com/nix-rust/nix/pull/670)) 415- Marked `sys::mman::{ mmap, munmap, madvise, munlock, msync }` as unsafe. 416 ([#559](https://github.com/nix-rust/nix/pull/559)) 417- Minimum supported Rust version is now 1.13. 418- Removed `revents` argument from `PollFd::new()` as it's an output argument and 419 will be overwritten regardless of value. 420 ([#542](https://github.com/nix-rust/nix/pull/542)) 421- Changed type signature of `sys::select::FdSet::contains` to make `self` 422 immutable ([#564](https://github.com/nix-rust/nix/pull/564)) 423- Introduced wrapper types for `gid_t`, `pid_t`, and `uid_t` as `Gid`, `Pid`, and `Uid` 424 respectively. Various functions have been changed to use these new types as 425 arguments. ([#629](https://github.com/nix-rust/nix/pull/629)) 426- Fixed compilation on all Android and iOS targets ([#527](https://github.com/nix-rust/nix/pull/527)) 427 and promoted them to Tier 2 support. 428- `nix::sys::statfs::{statfs,fstatfs}` uses statfs definition from `libc::statfs` instead of own linux specific type `nix::sys::Statfs`. 429 Also file system type constants like `nix::sys::statfs::ADFS_SUPER_MAGIC` were removed in favor of the libc equivalent. 430 ([#561](https://github.com/nix-rust/nix/pull/561)) 431- Revised the termios API including additional tests and documentation and exposed it on iOS. ([#527](https://github.com/nix-rust/nix/pull/527)) 432- `eventfd`, `signalfd`, and `pwritev`/`preadv` functionality is now included by default for all 433 supported platforms. ([#681](https://github.com/nix-rust/nix/pull/561)) 434- The `ioctl!` macro's plain variants has been replaced with "bad read" to be consistent with 435 other variants. The generated functions also have more strict types for their arguments. The 436 "*_buf" variants also now calculate total array size and take slice references for improved type 437 safety. The documentation has also been dramatically improved. 438 ([#670](https://github.com/nix-rust/nix/pull/670)) 439 440### Removed 441- Removed `io::Error` from `nix::Error` and the conversion from `nix::Error` to `Errno` 442 ([#614](https://github.com/nix-rust/nix/pull/614)) 443- All feature flags have been removed in favor of conditional compilation on supported platforms. 444 `execvpe` is no longer supported, but this was already broken and will be added back in the next 445 release. ([#681](https://github.com/nix-rust/nix/pull/561)) 446- Removed `ioc_*` functions and many helper constants and macros within the `ioctl` module. These 447 should always have been private and only the `ioctl!` should be used in public code. 448 ([#670](https://github.com/nix-rust/nix/pull/670)) 449 450### Fixed 451- Fixed multiple issues compiling under different archetectures and OSes. 452 Now compiles on Linux/MIPS ([#538](https://github.com/nix-rust/nix/pull/538)), 453 `Linux/PPC` ([#553](https://github.com/nix-rust/nix/pull/553)), 454 `MacOS/x86_64,i686` ([#553](https://github.com/nix-rust/nix/pull/553)), 455 `NetBSD/x64_64` ([#538](https://github.com/nix-rust/nix/pull/538)), 456 `FreeBSD/x86_64,i686` ([#536](https://github.com/nix-rust/nix/pull/536)), and 457 `Android` ([#631](https://github.com/nix-rust/nix/pull/631)). 458- `bind` and `errno_location` now work correctly on `Android` 459 ([#631](https://github.com/nix-rust/nix/pull/631)) 460- Added `nix::ptrace` on all Linux-kernel-based platforms 461 [#624](https://github.com/nix-rust/nix/pull/624). Previously it was 462 only available on x86, x86-64, and ARM, and also not on Android. 463- Fixed `sys::socket::sendmsg` with zero entry `cmsgs` parameter. 464 ([#623](https://github.com/nix-rust/nix/pull/623)) 465- Multiple constants related to the termios API have now been properly defined for 466 all supported platforms. ([#527](https://github.com/nix-rust/nix/pull/527)) 467- `ioctl!` macro now supports working with non-int datatypes and properly supports all platforms. 468 ([#670](https://github.com/nix-rust/nix/pull/670)) 469 470## [0.8.1] 2017-04-16 471 472### Fixed 473- Fixed build on FreeBSD. (Cherry-picked 474 [a859ee3c](https://github.com/nix-rust/nix/commit/a859ee3c9396dfdb118fcc2c8ecc697e2d303467)) 475 476## [0.8.0] 2017-03-02 477 478### Added 479- Added `::nix::sys::termios::BaudRate` enum to provide portable baudrate 480 values. ([#518](https://github.com/nix-rust/nix/pull/518)) 481- Added a new `WaitStatus::PtraceEvent` to support ptrace events on Linux 482 and Android ([#438](https://github.com/nix-rust/nix/pull/438)) 483- Added support for POSIX AIO 484 ([#483](https://github.com/nix-rust/nix/pull/483)) 485 ([#506](https://github.com/nix-rust/nix/pull/506)) 486- Added support for XNU system control sockets 487 ([#478](https://github.com/nix-rust/nix/pull/478)) 488- Added support for `ioctl` calls on BSD platforms 489 ([#478](https://github.com/nix-rust/nix/pull/478)) 490- Added struct `TimeSpec` 491 ([#475](https://github.com/nix-rust/nix/pull/475)) 492 ([#483](https://github.com/nix-rust/nix/pull/483)) 493- Added complete definitions for all kqueue-related constants on all supported 494 OSes 495 ([#415](https://github.com/nix-rust/nix/pull/415)) 496- Added function `epoll_create1` and bitflags `EpollCreateFlags` in 497 `::nix::sys::epoll` in order to support `::libc::epoll_create1`. 498 ([#410](https://github.com/nix-rust/nix/pull/410)) 499- Added `setresuid` and `setresgid` for Linux in `::nix::unistd` 500 ([#448](https://github.com/nix-rust/nix/pull/448)) 501- Added `getpgid` in `::nix::unistd` 502 ([#433](https://github.com/nix-rust/nix/pull/433)) 503- Added `tcgetpgrp` and `tcsetpgrp` in `::nix::unistd` 504 ([#451](https://github.com/nix-rust/nix/pull/451)) 505- Added `CLONE_NEWCGROUP` in `::nix::sched` 506 ([#457](https://github.com/nix-rust/nix/pull/457)) 507- Added `getpgrp` in `::nix::unistd` 508 ([#491](https://github.com/nix-rust/nix/pull/491)) 509- Added `fchdir` in `::nix::unistd` 510 ([#497](https://github.com/nix-rust/nix/pull/497)) 511- Added `major` and `minor` in `::nix::sys::stat` for decomposing `dev_t` 512 ([#508](https://github.com/nix-rust/nix/pull/508)) 513- Fixed the style of many bitflags and use `libc` in more places. 514 ([#503](https://github.com/nix-rust/nix/pull/503)) 515- Added `ppoll` in `::nix::poll` 516 ([#520](https://github.com/nix-rust/nix/pull/520)) 517- Added support for getting and setting pipe size with fcntl(2) on Linux 518 ([#540](https://github.com/nix-rust/nix/pull/540)) 519 520### Changed 521- `::nix::sys::termios::{cfgetispeed, cfsetispeed, cfgetospeed, cfsetospeed}` 522 switched to use `BaudRate` enum from `speed_t`. 523 ([#518](https://github.com/nix-rust/nix/pull/518)) 524- `epoll_ctl` now could accept None as argument `event` 525 when op is `EpollOp::EpollCtlDel`. 526 ([#480](https://github.com/nix-rust/nix/pull/480)) 527- Removed the `bad` keyword from the `ioctl!` macro 528 ([#478](https://github.com/nix-rust/nix/pull/478)) 529- Changed `TimeVal` into an opaque Newtype 530 ([#475](https://github.com/nix-rust/nix/pull/475)) 531- `kill`'s signature, defined in `::nix::sys::signal`, changed, so that the 532 signal parameter has type `T: Into<Option<Signal>>`. `None` as an argument 533 for that parameter will result in a 0 passed to libc's `kill`, while a 534 `Some`-argument will result in the previous behavior for the contained 535 `Signal`. 536 ([#445](https://github.com/nix-rust/nix/pull/445)) 537- The minimum supported version of rustc is now 1.7.0. 538 ([#444](https://github.com/nix-rust/nix/pull/444)) 539- Changed `KEvent` to an opaque structure that may only be modified by its 540 constructor and the `ev_set` method. 541 ([#415](https://github.com/nix-rust/nix/pull/415)) 542 ([#442](https://github.com/nix-rust/nix/pull/442)) 543 ([#463](https://github.com/nix-rust/nix/pull/463)) 544- `pipe2` now calls `libc::pipe2` where available. Previously it was emulated 545 using `pipe`, which meant that setting `O_CLOEXEC` was not atomic. 546 ([#427](https://github.com/nix-rust/nix/pull/427)) 547- Renamed `EpollEventKind` to `EpollFlags` in `::nix::sys::epoll` in order for 548 it to conform with our conventions. 549 ([#410](https://github.com/nix-rust/nix/pull/410)) 550- `EpollEvent` in `::nix::sys::epoll` is now an opaque proxy for 551 `::libc::epoll_event`. The formerly public field `events` is now be read-only 552 accessible with the new method `events()` of `EpollEvent`. Instances of 553 `EpollEvent` can be constructed using the new method `new()` of EpollEvent. 554 ([#410](https://github.com/nix-rust/nix/pull/410)) 555- `SigFlags` in `::nix::sys::signal` has be renamed to `SigmaskHow` and its type 556 has changed from `bitflags` to `enum` in order to conform to our conventions. 557 ([#460](https://github.com/nix-rust/nix/pull/460)) 558- `sethostname` now takes a `&str` instead of a `&[u8]` as this provides an API 559 that makes more sense in normal, correct usage of the API. 560- `gethostname` previously did not expose the actual length of the hostname 561 written from the underlying system call at all. This has been updated to 562 return a `&CStr` within the provided buffer that is always properly 563 NUL-terminated (this is not guaranteed by the call with all platforms/libc 564 implementations). 565- Exposed all fcntl(2) operations at the module level, so they can be 566 imported direclty instead of via `FcntlArg` enum. 567 ([#541](https://github.com/nix-rust/nix/pull/541)) 568 569### Fixed 570- Fixed multiple issues with Unix domain sockets on non-Linux OSes 571 ([#474](https://github.com/nix-rust/nix/pull/415)) 572- Fixed using kqueue with `EVFILT_USER` on FreeBSD 573 ([#415](https://github.com/nix-rust/nix/pull/415)) 574- Fixed the build on FreeBSD, and fixed the getsockopt, sendmsg, and recvmsg 575 functions on that same OS. 576 ([#397](https://github.com/nix-rust/nix/pull/397)) 577- Fixed an off-by-one bug in `UnixAddr::new_abstract` in `::nix::sys::socket`. 578 ([#429](https://github.com/nix-rust/nix/pull/429)) 579- Fixed clone passing a potentially unaligned stack. 580 ([#490](https://github.com/nix-rust/nix/pull/490)) 581- Fixed mkdev not creating a `dev_t` the same way as libc. 582 ([#508](https://github.com/nix-rust/nix/pull/508)) 583 584## [0.7.0] 2016-09-09 585 586### Added 587- Added `lseek` and `lseek64` in `::nix::unistd` 588 ([#377](https://github.com/nix-rust/nix/pull/377)) 589- Added `mkdir` and `getcwd` in `::nix::unistd` 590 ([#416](https://github.com/nix-rust/nix/pull/416)) 591- Added accessors `sigmask_mut` and `sigmask` to `UContext` in 592 `::nix::ucontext`. 593 ([#370](https://github.com/nix-rust/nix/pull/370)) 594- Added `WUNTRACED` to `WaitPidFlag` in `::nix::sys::wait` for non-_linux_ 595 targets. 596 ([#379](https://github.com/nix-rust/nix/pull/379)) 597- Added new module `::nix::sys::reboot` with enumeration `RebootMode` and 598 functions `reboot` and `set_cad_enabled`. Currently for _linux_ only. 599 ([#386](https://github.com/nix-rust/nix/pull/386)) 600- `FdSet` in `::nix::sys::select` now also implements `Clone`. 601 ([#405](https://github.com/nix-rust/nix/pull/405)) 602- Added `F_FULLFSYNC` to `FcntlArg` in `::nix::fcntl` for _apple_ targets. 603 ([#407](https://github.com/nix-rust/nix/pull/407)) 604- Added `CpuSet::unset` in `::nix::sched`. 605 ([#402](https://github.com/nix-rust/nix/pull/402)) 606- Added constructor method `new()` to `PollFd` in `::nix::poll`, in order to 607 allow creation of objects, after removing public access to members. 608 ([#399](https://github.com/nix-rust/nix/pull/399)) 609- Added method `revents()` to `PollFd` in `::nix::poll`, in order to provide 610 read access to formerly public member `revents`. 611 ([#399](https://github.com/nix-rust/nix/pull/399)) 612- Added `MSG_CMSG_CLOEXEC` to `MsgFlags` in `::nix::sys::socket` for _linux_ only. 613 ([#422](https://github.com/nix-rust/nix/pull/422)) 614 615### Changed 616- Replaced the reexported integer constants for signals by the enumeration 617 `Signal` in `::nix::sys::signal`. 618 ([#362](https://github.com/nix-rust/nix/pull/362)) 619- Renamed `EventFdFlag` to `EfdFlags` in `::nix::sys::eventfd`. 620 ([#383](https://github.com/nix-rust/nix/pull/383)) 621- Changed the result types of `CpuSet::is_set` and `CpuSet::set` in 622 `::nix::sched` to `Result<bool>` and `Result<()>`, respectively. They now 623 return `EINVAL`, if an invalid argument for the `field` parameter is passed. 624 ([#402](https://github.com/nix-rust/nix/pull/402)) 625- `MqAttr` in `::nix::mqueue` is now an opaque proxy for `::libc::mq_attr`, 626 which has the same structure as the old `MqAttr`. The field `mq_flags` of 627 `::libc::mq_attr` is readable using the new method `flags()` of `MqAttr`. 628 `MqAttr` also no longer implements `Debug`. 629 ([#392](https://github.com/nix-rust/nix/pull/392)) 630- The parameter `msq_prio` of `mq_receive` with type `u32` in `::nix::mqueue` 631 was replaced by a parameter named `msg_prio` with type `&mut u32`, so that 632 the message priority can be obtained by the caller. 633 ([#392](https://github.com/nix-rust/nix/pull/392)) 634- The type alias `MQd` in `::nix::queue` was replaced by the type alias 635 `libc::mqd_t`, both of which are aliases for the same type. 636 ([#392](https://github.com/nix-rust/nix/pull/392)) 637 638### Removed 639- Type alias `SigNum` from `::nix::sys::signal`. 640 ([#362](https://github.com/nix-rust/nix/pull/362)) 641- Type alias `CpuMask` from `::nix::shed`. 642 ([#402](https://github.com/nix-rust/nix/pull/402)) 643- Removed public fields from `PollFd` in `::nix::poll`. (See also added method 644 `revents()`. 645 ([#399](https://github.com/nix-rust/nix/pull/399)) 646 647### Fixed 648- Fixed the build problem for NetBSD (Note, that we currently do not support 649 it, so it might already be broken again). 650 ([#389](https://github.com/nix-rust/nix/pull/389)) 651- Fixed the build on FreeBSD, and fixed the getsockopt, sendmsg, and recvmsg 652 functions on that same OS. 653 ([#397](https://github.com/nix-rust/nix/pull/397)) 654 655## [0.6.0] 2016-06-10 656 657### Added 658- Added `gettid` in `::nix::unistd` for _linux_ and _android_. 659 ([#293](https://github.com/nix-rust/nix/pull/293)) 660- Some _mips_ support in `::nix::sched` and `::nix::sys::syscall`. 661 ([#301](https://github.com/nix-rust/nix/pull/301)) 662- Added `SIGNALFD_SIGINFO_SIZE` in `::nix::sys::signalfd`. 663 ([#309](https://github.com/nix-rust/nix/pull/309)) 664- Added new module `::nix::ucontext` with struct `UContext`. Currently for 665 _linux_ only. 666 ([#311](https://github.com/nix-rust/nix/pull/311)) 667- Added `EPOLLEXCLUSIVE` to `EpollEventKind` in `::nix::sys::epoll`. 668 ([#330](https://github.com/nix-rust/nix/pull/330)) 669- Added `pause` to `::nix::unistd`. 670 ([#336](https://github.com/nix-rust/nix/pull/336)) 671- Added `sleep` to `::nix::unistd`. 672 ([#351](https://github.com/nix-rust/nix/pull/351)) 673- Added `S_IFDIR`, `S_IFLNK`, `S_IFMT` to `SFlag` in `::nix::sys::stat`. 674 ([#359](https://github.com/nix-rust/nix/pull/359)) 675- Added `clear` and `extend` functions to `SigSet`'s implementation in 676 `::nix::sys::signal`. 677 ([#347](https://github.com/nix-rust/nix/pull/347)) 678- `sockaddr_storage_to_addr` in `::nix::sys::socket` now supports `sockaddr_nl` 679 on _linux_ and _android_. 680 ([#366](https://github.com/nix-rust/nix/pull/366)) 681- Added support for `SO_ORIGINAL_DST` in `::nix::sys::socket` on _linux_. 682 ([#367](https://github.com/nix-rust/nix/pull/367)) 683- Added `SIGINFO` in `::nix::sys::signal` for the _macos_ target as well as 684 `SIGPWR` and `SIGSTKFLT` in `::nix::sys::signal` for non-_macos_ targets. 685 ([#361](https://github.com/nix-rust/nix/pull/361)) 686 687### Changed 688- Changed the structure `IoVec` in `::nix::sys::uio`. 689 ([#304](https://github.com/nix-rust/nix/pull/304)) 690- Replaced `CREATE_NEW_FD` by `SIGNALFD_NEW` in `::nix::sys::signalfd`. 691 ([#309](https://github.com/nix-rust/nix/pull/309)) 692- Renamed `SaFlag` to `SaFlags` and `SigFlag` to `SigFlags` in 693 `::nix::sys::signal`. 694 ([#314](https://github.com/nix-rust/nix/pull/314)) 695- Renamed `Fork` to `ForkResult` and changed its fields in `::nix::unistd`. 696 ([#332](https://github.com/nix-rust/nix/pull/332)) 697- Added the `signal` parameter to `clone`'s signature in `::nix::sched`. 698 ([#344](https://github.com/nix-rust/nix/pull/344)) 699- `execv`, `execve`, and `execvp` now return `Result<Void>` instead of 700 `Result<()>` in `::nix::unistd`. 701 ([#357](https://github.com/nix-rust/nix/pull/357)) 702 703### Fixed 704- Improved the conversion from `std::net::SocketAddr` to `InetAddr` in 705 `::nix::sys::socket::addr`. 706 ([#335](https://github.com/nix-rust/nix/pull/335)) 707 708## [0.5.0] 2016-03-01 709