1All notable changes to this project will be documented in this file. 2This project adheres to [Semantic Versioning](https://semver.org/). 3 4# Change Log 5 6## [0.28.0] - 2024-02-24 7 8 9### Added 10 11- Added `mkdtemp` wrapper ([#1297](https://github.com/nix-rust/nix/pull/1297)) 12- Add associated constants `UTIME_OMIT` `UTIME_NOW` for `TimeSpec` 13 ([#1879](https://github.com/nix-rust/nix/pull/1879)) 14- Added `EventFd` type. ([#1945](https://github.com/nix-rust/nix/pull/1945)) 15- - Added `impl From<Signal> for SigSet`. 16 - Added `impl std::ops::BitOr for SigSet`. 17 - Added `impl std::ops::BitOr for Signal`. 18 - Added `impl std::ops::BitOr<Signal> for SigSet` 19 20 ([#1959](https://github.com/nix-rust/nix/pull/1959)) 21- Added `TlsGetRecordType` control message type and corresponding enum for 22 linux ([#2065](https://github.com/nix-rust/nix/pull/2065)) 23- Added `Ipv6HopLimit` to `::nix::sys::socket::ControlMessage` for Linux, 24 MacOS, FreeBSD, DragonflyBSD, Android, iOS and Haiku. 25 ([#2074](https://github.com/nix-rust/nix/pull/2074)) 26- Added `Icmp` and `IcmpV6` to `SockProtocol` 27 ([#2103](https://github.com/nix-rust/nix/pull/2103)) 28- Added rfork support for FreeBSD in `unistd` 29 ([#2121](https://github.com/nix-rust/nix/pull/2121)) 30- Added `MapFlags::map_hugetlb_with_size_log2` method for Linux targets 31 ([#2125](https://github.com/nix-rust/nix/pull/2125)) 32- Added `mmap_anonymous` function 33 ([#2127](https://github.com/nix-rust/nix/pull/2127)) 34- Added `mips32r6` and `mips64r6` support for signal, ioctl and ptrace 35 ([#2138](https://github.com/nix-rust/nix/pull/2138)) 36- Added `F_GETPATH` FcntlFlags entry on Apple/NetBSD/DragonflyBSD for 37 `::nix::fcntl`. ([#2142](https://github.com/nix-rust/nix/pull/2142)) 38- Added `F_KINFO` FcntlFlags entry on FreeBSD for `::nix::fcntl`. 39 ([#2152](https://github.com/nix-rust/nix/pull/2152)) 40- Added `F_GETPATH_NOFIRMLINK` and `F_BARRIERFSYNC` FcntlFlags entry 41 on Apple for `::nix::fcntl`. 42 ([#2155](https://github.com/nix-rust/nix/pull/2155)) 43- Added newtype `Flock` to automatically unlock a held flock upon drop. 44 Added `Flockable` trait to represent valid types for `Flock`. 45 ([#2170](https://github.com/nix-rust/nix/pull/2170)) 46- Added `SetSockOpt` impls to enable Linux Kernel TLS on a TCP socket and to 47 import TLS parameters. ([#2175](https://github.com/nix-rust/nix/pull/2175)) 48- - Added the `::nix::sys::socket::SocketTimestamp` enum for configuring the 49 `TsClock` (a.k.a `SO_TS_CLOCK`) sockopt 50 - Added FreeBSD's `ScmRealtime` and `ScmMonotonic` as new options in 51 `::nix::sys::socket::ControlMessageOwned` 52 53 ([#2187](https://github.com/nix-rust/nix/pull/2187)) 54- Added new fanotify API: wrappers for `fanotify_init` and `fanotify_mark` 55 ([#2194](https://github.com/nix-rust/nix/pull/2194)) 56- Added `SpecialCharacterindices` support for haiku. 57 ([#2195](https://github.com/nix-rust/nix/pull/2195)) 58- Added `sys::sendfile` support for solaris/illumos. 59 ([#2198](https://github.com/nix-rust/nix/pull/2198)) 60- impl Display for InterfaceFlags 61 ([#2206](https://github.com/nix-rust/nix/pull/2206)) 62- Added `sendfilev` in sys::sendfile for solarish 63 ([#2207](https://github.com/nix-rust/nix/pull/2207)) 64- Added `fctrl::SealFlag::F_SEAL_FUTURE_WRITE` 65 ([#2213](https://github.com/nix-rust/nix/pull/2213)) 66- Added `Ipv6MulticastHops` as socket option to set and read. 67 ([#2234](https://github.com/nix-rust/nix/pull/2234)) 68- Enable `ControlMessageOwned::Ipv4RecvIf` and 69 `ControlMessageOwned::Ipv4RecvDstAddr` for DragonFlyBSD 70 ([#2240](https://github.com/nix-rust/nix/pull/2240)) 71- `ClockId::set_time()` and `time::clock_settime()` are now enabled on macOS 72 ([#2241](https://github.com/nix-rust/nix/pull/2241)) 73- Added `IpBindAddressNoPort` sockopt to support `IP_BIND_ADDRESS_NO_PORT` 74 available on linux. ([#2244](https://github.com/nix-rust/nix/pull/2244)) 75- Enable `MapFlags::map_hugetlb_with_size_log2` method for Android/Fuchsia 76 ([#2245](https://github.com/nix-rust/nix/pull/2245)) 77- Added `TcpFastOpenConnect` sockopt to support `TCP_FASTOPEN_CONNECT` 78 available on linux. ([#2247](https://github.com/nix-rust/nix/pull/2247)) 79- Add `reboot(2)` for OpenBSD/NetBSD 80 ([#2251](https://github.com/nix-rust/nix/pull/2251)) 81- Added new `MemFdCreateFlag` constants to `sys::memfd` on Linux and Android 82 related to hugetlbfs support. 83 ([#2252](https://github.com/nix-rust/nix/pull/2252)) 84- Expose the inner fd of `Kqueue` through: 85 86 * impl AsFd for Kqueue 87 * impl From\<Kqueue\> for OwnedFd 88 89 ([#2258](https://github.com/nix-rust/nix/pull/2258)) 90- Added `sys::eventfd` support on FreeBSD 91 ([#2259](https://github.com/nix-rust/nix/pull/2259)) 92- Added `MmapFlags::MAP_FIXED` constant in `sys::mman` for netbsd and openbsd 93 ([#2260](https://github.com/nix-rust/nix/pull/2260)) 94- Added the `SO_LISTENQLIMIT` sockopt. 95 ([#2263](https://github.com/nix-rust/nix/pull/2263)) 96- Enable the `AT_EMPTY_PATH` flag for the `fchownat()` function 97 ([#2267](https://github.com/nix-rust/nix/pull/2267)) 98- Add `AtFlags::AT_EMPTY_PATH` for FreeBSD and Hurd 99 ([#2270](https://github.com/nix-rust/nix/pull/2270)) 100- Enable `OFlag::O_DIRECTORY for Solarish 101 ([#2275](https://github.com/nix-rust/nix/pull/2275)) 102- Added the `Backlog` wrapper type for the `listen` call. 103 ([#2276](https://github.com/nix-rust/nix/pull/2276)) 104- Add `clock_nanosleep()` ([#2277](https://github.com/nix-rust/nix/pull/2277)) 105- Enabled `O_DIRECT` in `fcntl::OFlags` for solarish 106 ([#2278](https://github.com/nix-rust/nix/pull/2278)) 107- Added a new API sigsuspend. 108 ([#2279](https://github.com/nix-rust/nix/pull/2279)) 109- - Added `errno::Errno::set` function 110 - Added `errno::Errno::set_raw` function 111 - Added `errno::Errno::last_raw` function 112 - Added `errno::Errno::from_raw` function 113 114 ([#2283](https://github.com/nix-rust/nix/pull/2283)) 115- Enable the `AT_EMPTY_PATH` flag for the `linkat()` function 116 ([#2284](https://github.com/nix-rust/nix/pull/2284)) 117- Enable unistd::{sync, syncfs} for Android 118 ([#2296](https://github.com/nix-rust/nix/pull/2296)) 119 120### Changed 121 122- `poll` now takes `PollTimeout` replacing `libc::c_int`. 123 ([#1876](https://github.com/nix-rust/nix/pull/1876)) 124- Deprecated `sys::eventfd::eventfd`. 125 ([#1945](https://github.com/nix-rust/nix/pull/1945)) 126- `mmap`, `mmap_anonymous`, `munmap`, `mremap`, `madvise`, `msync`, `mprotect`, 127 `munlock` and `mlock` updated to use `NonNull`. 128 ([#2000](https://github.com/nix-rust/nix/pull/2000)) 129- `mmap` function now accepts `F` instead of `Option<F>` 130 ([#2127](https://github.com/nix-rust/nix/pull/2127)) 131- `PollFd::new` now takes a `BorrowedFd` argument, with relaxed lifetime 132 requirements relative to the previous version. 133 ([#2134](https://github.com/nix-rust/nix/pull/2134)) 134- `FdSet::{insert, remove, contains}` now take `BorrowedFd` arguments, and have 135 relaxed lifetime requirements relative to 0.27.1. 136 ([#2136](https://github.com/nix-rust/nix/pull/2136)) 137- The following APIs now take an implementation of `AsFd` rather than a 138 `RawFd`: 139 140 - `unistd::tcgetpgrp` 141 - `unistd::tcsetpgrp` 142 - `unistd::fpathconf` 143 - `unistd::ttyname` 144 - `unistd::getpeereid` ([#2137](https://github.com/nix-rust/nix/pull/2137)) 145- Changed `openat()` and `Dir::openat()`, now take optional `dirfd`s 146 ([#2139](https://github.com/nix-rust/nix/pull/2139)) 147- The MSRV is now 1.69 ([#2144](https://github.com/nix-rust/nix/pull/2144)) 148- Changed function `SockaddrIn::ip()` to return `net::Ipv4Addr` and refactored 149 `SocketAddrV6::ip()` to be `const` 150 ([#2151](https://github.com/nix-rust/nix/pull/2151)) 151- The following APIs now take optional `dirfd`s: 152 153 - `readlinkat()` 154 - `fstatat()` 155 - `mknodat()` 156 - `mkdirat()` 157 - `execveat()` 158 159 ([#2157](https://github.com/nix-rust/nix/pull/2157)) 160- `Epoll::wait` now takes `EpollTimeout` replacing `isize`. 161 ([#2202](https://github.com/nix-rust/nix/pull/2202)) 162- - Deprecated `errno::errno()` function (use `Errno::last_raw()`) 163 - Deprecated `errno::from_i32()` function (use `Errno::from_raw()`) 164 - Deprecated `errno::Errno::from_i32()` function (use `Errno::from_raw()`) 165 166 ([#2283](https://github.com/nix-rust/nix/pull/2283)) 167 168### Fixed 169 170- Fix `SigSet` incorrect implementation of `Eq`, `PartialEq` and `Hash` 171 ([#1946](https://github.com/nix-rust/nix/pull/1946)) 172- Fixed `::sys::socket::sockopt::IpMulticastTtl` by fixing the value of optlen 173 passed to `libc::setsockopt` and added tests. 174 ([#2072](https://github.com/nix-rust/nix/pull/2072)) 175- Fixed the function signature of `recvmmsg`, potentially causing UB 176 ([#2119](https://github.com/nix-rust/nix/pull/2119)) 177- Fix `SignalFd::set_mask`. In 0.27.0 it would actually close the file 178 descriptor. ([#2141](https://github.com/nix-rust/nix/pull/2141)) 179- Fixed UnixAddr::new for haiku, it did not record the `sun_len` value as 180 needed. 181 Fixed `sys::socket::addr::from_raw_parts` and 182 `sys::socket::Sockaddrlike::len` build for solaris. 183 ([#2242](https://github.com/nix-rust/nix/pull/2242)) 184- Fixed solaris build globally. 185 ([#2248](https://github.com/nix-rust/nix/pull/2248)) 186- Changed the `dup3` wrapper to perform a real call to `dup3` instead of 187 emulating it via `dup2` and `fcntl` to get rid of race condition 188 ([#2268](https://github.com/nix-rust/nix/pull/2268)) 189- Fixed `::unistd::Group::members` using read_unaligned to avoid crash on 190 misaligned pointers ([#2311](https://github.com/nix-rust/nix/pull/2311)) 191 192### Removed 193 194- The `FchownatFlags` type has been deprecated, please use `AtFlags` instead. 195 ([#2267](https://github.com/nix-rust/nix/pull/2267)) 196- Removed the `dup3` wrapper on macOS, which was emulated via `dup2` and 197 `fcntl` and could cause a race condition. The `dup3` system call is not 198 supported on macOS. ([#2268](https://github.com/nix-rust/nix/pull/2268)) 199- The `LinkatFlags` type has been deprecated, please use `AtFlags` instead. 200 ([#2284](https://github.com/nix-rust/nix/pull/2284)) 201 202 203## [0.27.1] - 2023-08-28 204 205### Fixed 206 207- Fixed generating the documentation on docs.rs. 208 ([#2111](https://github.com/nix-rust/nix/pull/2111)) 209 210## [0.27.0] - 2023-08-28 211### Added 212- Added `AT_EACCESS` to `AtFlags` on all platforms but android 213 ([#1995](https://github.com/nix-rust/nix/pull/1995)) 214- Add `PF_ROUTE` to `SockType` on macOS, iOS, all of the BSDs, Fuchsia, Haiku, Illumos. 215 ([#1867](https://github.com/nix-rust/nix/pull/1867)) 216- Added `nix::ucontext` module on `aarch64-unknown-linux-gnu`. 217 (#[1662](https://github.com/nix-rust/nix/pull/1662)) 218- Added `CanRaw` to `SockProtocol` and `CanBcm` as a separate `SocProtocol` constant. 219 ([#1912](https://github.com/nix-rust/nix/pull/1912)) 220- Added `Generic` and `NFLOG` to `SockProtocol`. 221 ([#2092](https://github.com/nix-rust/nix/pull/2092)) 222- Added `mq_timedreceive` to `::nix::mqueue`. 223 ([#1966])(https://github.com/nix-rust/nix/pull/1966) 224- Added `LocalPeerPid` to `nix::sys::socket::sockopt` for macOS. ([#1967](https://github.com/nix-rust/nix/pull/1967)) 225- Added `TFD_TIMER_CANCEL_ON_SET` to `::nix::sys::time::TimerSetTimeFlags` on Linux and Android. 226 ([#2040](https://github.com/nix-rust/nix/pull/2040)) 227- Added `SOF_TIMESTAMPING_OPT_ID` and `SOF_TIMESTAMPING_OPT_TSONLY` to `nix::sys::socket::TimestampingFlag`. 228 ([#2048](https://github.com/nix-rust/nix/pull/2048)) 229- Enabled socket timestamping options on Android. ([#2077](https://github.com/nix-rust/nix/pull/2077)) 230- Added vsock support for macOS ([#2056](https://github.com/nix-rust/nix/pull/2056)) 231- Added `SO_SETFIB` and `SO_USER_COOKIE` to `nix::sys::socket::sockopt` for FreeBSD. 232 ([#2085](https://github.com/nix-rust/nix/pull/2085)) 233- Added `SO_RTABLE` for OpenBSD and `SO_ACCEPTFILTER` for FreeBSD/NetBSD to `nix::sys::socket::sockopt`. 234 ([#2085](https://github.com/nix-rust/nix/pull/2085)) 235- Added `MSG_WAITFORONE` to `MsgFlags` on Android, Fuchsia, Linux, NetBSD, 236 FreeBSD, OpenBSD, and Solaris. 237 ([#2014](https://github.com/nix-rust/nix/pull/2014)) 238- Added `SO_TS_CLOCK` for FreeBSD to `nix::sys::socket::sockopt`. 239 ([#2093](https://github.com/nix-rust/nix/pull/2093)) 240- Added support for prctl in Linux. 241 (#[1550](https://github.com/nix-rust/nix/pull/1550)) 242- `nix::socket` and `nix::select` are now available on Redox. 243 ([#2012](https://github.com/nix-rust/nix/pull/2012)) 244- Implemented AsFd, AsRawFd, FromRawFd, and IntoRawFd for `mqueue::MqdT`. 245 ([#2097](https://github.com/nix-rust/nix/pull/2097)) 246- Add the ability to set `kevent_flags` on `SigEvent`. 247 ([#1731](https://github.com/nix-rust/nix/pull/1731)) 248 249### Changed 250 251- All Cargo features have been removed from the default set. Users will need to 252 specify which features they depend on in their Cargo.toml. 253 ([#2091](https://github.com/nix-rust/nix/pull/2091)) 254- Implemented I/O safety for many, but not all, of Nix's APIs. Many public 255 functions argument and return types have changed: 256 | Original Type | New Type | 257 | ------------- | --------------------- | 258 | AsRawFd | AsFd | 259 | RawFd | BorrowedFd or OwnedFd | 260 261 (#[1906](https://github.com/nix-rust/nix/pull/1906)) 262- Use I/O safety with `copy_file_range`, and expose it on FreeBSD. 263 (#[1906](https://github.com/nix-rust/nix/pull/1906)) 264- The MSRV is now 1.65 265 ([#1862](https://github.com/nix-rust/nix/pull/1862)) 266 ([#2104](https://github.com/nix-rust/nix/pull/2104)) 267- The epoll interface now uses a type. 268 ([#1882](https://github.com/nix-rust/nix/pull/1882)) 269- With I/O-safe type applied in `pty::OpenptyResult` and `pty::ForkptyResult`, 270 users no longer need to manually close the file descriptors in these types. 271 ([#1921](https://github.com/nix-rust/nix/pull/1921)) 272- Refactored `name` parameter of `mq_open` and `mq_unlink` to be generic over 273 `NixPath`. 274 ([#2102](https://github.com/nix-rust/nix/pull/2102)). 275- Made `clone` unsafe, like `fork`. 276 ([#1993](https://github.com/nix-rust/nix/pull/1993)) 277 278### Removed 279 280- `sys::event::{kevent, kevent_ts}` are deprecated in favor of 281 `sys::kevent::Kqueue::kevent`, and `sys::event::kqueue` is deprecated in 282 favor of `sys::kevent::Kqueue::new`. 283 ([#1943](https://github.com/nix-rust/nix/pull/1943)) 284- Removed deprecated IoVec API. 285 ([#1855](https://github.com/nix-rust/nix/pull/1855)) 286- Removed deprecated net APIs. 287 ([#1861](https://github.com/nix-rust/nix/pull/1861)) 288- `nix::sys::signalfd::signalfd` is deprecated. Use 289 `nix::sys::signalfd::SignalFd` instead. 290 ([#1938](https://github.com/nix-rust/nix/pull/1938)) 291- Removed `SigEvent` support on Fuchsia, where it was unsound. 292 ([#2079](https://github.com/nix-rust/nix/pull/2079)) 293- Removed `flock` from `::nix::fcntl` on Solaris. 294 ([#2082](https://github.com/nix-rust/nix/pull/2082)) 295 296## [0.26.3] - 2023-08-27 297 298### Fixed 299- Fix: send `ETH_P_ALL` in htons format 300 ([#1925](https://github.com/nix-rust/nix/pull/1925)) 301- Fix: `recvmsg` now sets the length of the received `sockaddr_un` field 302 correctly on Linux platforms. ([#2041](https://github.com/nix-rust/nix/pull/2041)) 303- Fix potentially invalid conversions in 304 `SockaddrIn::from<std::net::SocketAddrV4>`, 305 `SockaddrIn6::from<std::net::SockaddrV6>`, `IpMembershipRequest::new`, and 306 `Ipv6MembershipRequest::new` with future Rust versions. 307 ([#2061](https://github.com/nix-rust/nix/pull/2061)) 308- Fixed an incorrect lifetime returned from `recvmsg`. 309 ([#2095](https://github.com/nix-rust/nix/pull/2095)) 310 311## [0.26.2] - 2023-01-18 312 313### Fixed 314 315- Fix `SockaddrIn6` bug that was swapping `flowinfo` and `scope_id` byte 316 ordering. 317 ([#1964](https://github.com/nix-rust/nix/pull/1964)) 318 319## [0.26.1] - 2022-11-29 320### Fixed 321- Fix UB with `sys::socket::sockopt::SockType` using `SOCK_PACKET`. 322 ([#1821](https://github.com/nix-rust/nix/pull/1821)) 323 324## [0.26.0] - 2022-11-29 325### Added 326 327- Added `SockaddrStorage::{as_unix_addr, as_unix_addr_mut}` 328 ([#1871](https://github.com/nix-rust/nix/pull/1871)) 329- Added `MntFlags` and `unmount` on all of the BSDs. 330- Added `any()` and `all()` to `poll::PollFd`. 331 ([#1877](https://github.com/nix-rust/nix/pull/1877)) 332- Add `MntFlags` and `unmount` on all of the BSDs. 333 ([#1849](https://github.com/nix-rust/nix/pull/1849)) 334- Added a `Statfs::flags` method. 335 ([#1849](https://github.com/nix-rust/nix/pull/1849)) 336- Added `NSFS_MAGIC` FsType on Linux and Android. 337 ([#1829](https://github.com/nix-rust/nix/pull/1829)) 338- Added `sched_getcpu` on platforms that support it. 339 ([#1825](https://github.com/nix-rust/nix/pull/1825)) 340- Added `sched_getaffinity` and `sched_setaffinity` on FreeBSD. 341 ([#1804](https://github.com/nix-rust/nix/pull/1804)) 342- Added `line_discipline` field to `Termios` on Linux, Android and Haiku 343 ([#1805](https://github.com/nix-rust/nix/pull/1805)) 344- Expose the memfd module on FreeBSD (memfd was added in FreeBSD 13) 345 ([#1808](https://github.com/nix-rust/nix/pull/1808)) 346- Added `domainname` field of `UtsName` on Android and Linux 347 ([#1817](https://github.com/nix-rust/nix/pull/1817)) 348- Re-export `RLIM_INFINITY` from `libc` 349 ([#1831](https://github.com/nix-rust/nix/pull/1831)) 350- Added `syncfs(2)` on Linux 351 ([#1833](https://github.com/nix-rust/nix/pull/1833)) 352- Added `faccessat(2)` on illumos 353 ([#1841](https://github.com/nix-rust/nix/pull/1841)) 354- Added `eaccess()` on FreeBSD, DragonFly and Linux (glibc and musl). 355 ([#1842](https://github.com/nix-rust/nix/pull/1842)) 356- Added `IP_TOS` `SO_PRIORITY` and `IPV6_TCLASS` sockopts for Linux 357 ([#1853](https://github.com/nix-rust/nix/pull/1853)) 358- Added `new_unnamed` and `is_unnamed` for `UnixAddr` on Linux and Android. 359 ([#1857](https://github.com/nix-rust/nix/pull/1857)) 360- Added `SockProtocol::Raw` for raw sockets 361 ([#1848](https://github.com/nix-rust/nix/pull/1848)) 362- added `IP_MTU` (`IpMtu`) `IPPROTO_IP` sockopt on Linux and Android. 363 ([#1865](https://github.com/nix-rust/nix/pull/1865)) 364 365### Changed 366 367- The MSRV is now 1.56.1 368 ([#1792](https://github.com/nix-rust/nix/pull/1792)) 369- The `addr` argument of `sys::mman::mmap` is now of type `Option<NonZeroUsize>`. 370 ([#1870](https://github.com/nix-rust/nix/pull/1870)) 371- The `length` argument of `sys::mman::mmap` is now of type `NonZeroUsize`. 372 ([#1873](https://github.com/nix-rust/nix/pull/1873)) 373 374### Fixed 375 376- Fixed using `SockaddrStorage` to store a Unix-domain socket address on Linux. 377 ([#1871](https://github.com/nix-rust/nix/pull/1871)) 378- Fix microsecond calculation for `TimeSpec`. 379 ([#1801](https://github.com/nix-rust/nix/pull/1801)) 380- Fix `User::from_name` and `Group::from_name` panicking 381 when given a name containing a nul. 382 ([#1815](https://github.com/nix-rust/nix/pull/1815)) 383- Fix `User::from_uid` and `User::from_name` crash on Android platform. 384 ([#1824](https://github.com/nix-rust/nix/pull/1824)) 385- Workaround XNU bug causing netmasks returned by `getifaddrs` to misbehave. 386 ([#1788](https://github.com/nix-rust/nix/pull/1788)) 387 388### Removed 389 390- Removed deprecated error constants and conversions. 391 ([#1860](https://github.com/nix-rust/nix/pull/1860)) 392 393## [0.25.0] - 2022-08-13 394### Added 395 396- Added `faccessat` 397 ([#1780](https://github.com/nix-rust/nix/pull/1780)) 398- Added `memfd` on Android. 399 (#[1773](https://github.com/nix-rust/nix/pull/1773)) 400- Added `ETH_P_ALL` to `SockProtocol` enum 401 (#[1768](https://github.com/nix-rust/nix/pull/1768)) 402- Added four non-standard Linux `SysconfVar` variants 403 (#[1761](https://github.com/nix-rust/nix/pull/1761)) 404- Added const constructors for `TimeSpec` and `TimeVal` 405 (#[1760](https://github.com/nix-rust/nix/pull/1760)) 406- Added `chflags`. 407 (#[1758](https://github.com/nix-rust/nix/pull/1758)) 408- Added `aio_writev` and `aio_readv`. 409 (#[1713](https://github.com/nix-rust/nix/pull/1713)) 410- impl `From<uid_t>` for `Uid` and `From<gid_t>` for `Gid` 411 (#[1727](https://github.com/nix-rust/nix/pull/1727)) 412- impl `From<SockaddrIn>` for `std::net::SocketAddrV4` and 413 impl `From<SockaddrIn6>` for `std::net::SocketAddrV6`. 414 (#[1711](https://github.com/nix-rust/nix/pull/1711)) 415- Added support for the `x86_64-unknown-haiku` target. 416 (#[1703](https://github.com/nix-rust/nix/pull/1703)) 417- Added `ptrace::read_user` and `ptrace::write_user` for Linux. 418 (#[1697](https://github.com/nix-rust/nix/pull/1697)) 419- Added `getrusage` and helper types `UsageWho` and `Usage` 420 (#[1747](https://github.com/nix-rust/nix/pull/1747)) 421- Added the `DontRoute` SockOpt 422 (#[1752](https://github.com/nix-rust/nix/pull/1752)) 423- Added `signal::SigSet::from_sigset_t_unchecked()`. 424 (#[1741](https://github.com/nix-rust/nix/pull/1741)) 425- Added the `Ipv4OrigDstAddr` sockopt and control message. 426 (#[1772](https://github.com/nix-rust/nix/pull/1772)) 427- Added the `Ipv6OrigDstAddr` sockopt and control message. 428 (#[1772](https://github.com/nix-rust/nix/pull/1772)) 429- Added the `Ipv4SendSrcAddr` control message. 430 (#[1776](https://github.com/nix-rust/nix/pull/1776)) 431 432### Changed 433 434- Reimplemented sendmmsg/recvmmsg to avoid allocations and with better API 435 (#[1744](https://github.com/nix-rust/nix/pull/1744)) 436 437- Rewrote the aio module. The new module: 438 * Does more type checking at compile time rather than runtime. 439 * Gives the caller control over whether and when to `Box` an aio operation. 440 * Changes the type of the `priority` arguments to `i32`. 441 * Changes the return type of `aio_return` to `usize`. 442 (#[1713](https://github.com/nix-rust/nix/pull/1713)) 443- `nix::poll::ppoll`: `sigmask` parameter is now optional. 444 (#[1739](https://github.com/nix-rust/nix/pull/1739)) 445- Changed `gethostname` to return an owned `OsString`. 446 (#[1745](https://github.com/nix-rust/nix/pull/1745)) 447- `signal:SigSet` is now marked as `repr(transparent)`. 448 (#[1741](https://github.com/nix-rust/nix/pull/1741)) 449 450### Removed 451 452- Removed support for resubmitting partially complete `lio_listio` operations. 453 It was too complicated, and didn't fit Nix's theme of zero-cost abstractions. 454 Instead, it can be reimplemented downstream. 455 (#[1713](https://github.com/nix-rust/nix/pull/1713)) 456 457## [0.24.2] - 2022-07-17 458### Fixed 459 460- Fixed buffer overflow in `nix::sys::socket::recvfrom`. 461 (#[1763](https://github.com/nix-rust/nix/pull/1763)) 462- Enabled `SockaddrStorage::{as_link_addr, as_link_addr_mut}` for Linux-like 463 operating systems. 464 (#[1729](https://github.com/nix-rust/nix/pull/1729)) 465- Fixed `SockaddrLike::from_raw` implementations for `VsockAddr` and 466 `SysControlAddr`. 467 (#[1736](https://github.com/nix-rust/nix/pull/1736)) 468 469## [0.24.1] - 2022-04-22 470### Fixed 471 472- Fixed `UnixAddr::size` on Linux-based OSes. 473 (#[1702](https://github.com/nix-rust/nix/pull/1702)) 474 475## [0.24.0] - 2022-04-21 476### Added 477 478- Added fine-grained features flags. Most Nix functionality can now be 479 conditionally enabled. By default, all features are enabled. 480 (#[1611](https://github.com/nix-rust/nix/pull/1611)) 481- Added statfs FS type magic constants for `target_os = "android"` 482 and synced constants with libc v0.2.121. 483 (#[1690](https://github.com/nix-rust/nix/pull/1690)) 484- Added `fexecve` on DragonFly. 485 (#[1577](https://github.com/nix-rust/nix/pull/1577)) 486- `sys::uio::IoVec` is now `Send` and `Sync` 487 (#[1582](https://github.com/nix-rust/nix/pull/1582)) 488- Added `EPOLLEXCLUSIVE` on Android. 489 (#[1567](https://github.com/nix-rust/nix/pull/1567)) 490- Added `fdatasync` for FreeBSD, Fuchsia, NetBSD, and OpenBSD. 491 (#[1581](https://github.com/nix-rust/nix/pull/1581)) 492- Added `sched_setaffinity` and `sched_getaffinity` on DragonFly. 493 (#[1537](https://github.com/nix-rust/nix/pull/1537)) 494- Added `posix_fallocate` on DragonFly. 495 (#[1621](https://github.com/nix-rust/nix/pull/1621)) 496- Added `SO_TIMESTAMPING` support 497 (#[1547](https://github.com/nix-rust/nix/pull/1547)) 498- Added getter methods to `MqAttr` struct 499 (#[1619](https://github.com/nix-rust/nix/pull/1619)) 500- Added the `TxTime` sockopt and control message. 501 (#[1564](https://github.com/nix-rust/nix/pull/1564)) 502- Added POSIX per-process timer support 503 (#[1622](https://github.com/nix-rust/nix/pull/1622)) 504- Added `sendfile` on DragonFly. 505 (#[1615](https://github.com/nix-rust/nix/pull/1615)) 506- Added `UMOUNT_NOFOLLOW`, `FUSE_SUPER_MAGIC` on Linux. 507 (#[1634](https://github.com/nix-rust/nix/pull/1634)) 508- Added `getresuid`, `setresuid`, `getresgid`, and `setresgid` on DragonFly, FreeBSD, and OpenBSD. 509 (#[1628](https://github.com/nix-rust/nix/pull/1628)) 510- Added `MAP_FIXED_NOREPLACE` on Linux. 511 (#[1636](https://github.com/nix-rust/nix/pull/1636)) 512- Added `fspacectl` on FreeBSD 513 (#[1640](https://github.com/nix-rust/nix/pull/1640)) 514- Added `accept4` on DragonFly, Emscripten, Fuchsia, Illumos, and NetBSD. 515 (#[1654](https://github.com/nix-rust/nix/pull/1654)) 516- Added `AsRawFd` implementation on `OwningIter`. 517 (#[1563](https://github.com/nix-rust/nix/pull/1563)) 518- Added `process_vm_readv` and `process_vm_writev` on Android. 519 (#[1557](https://github.com/nix-rust/nix/pull/1557)) 520- Added `nix::ucontext` module on s390x. 521 (#[1662](https://github.com/nix-rust/nix/pull/1662)) 522- Implemented `Extend`, `FromIterator`, and `IntoIterator` for `SigSet` and 523 added `SigSet::iter` and `SigSetIter`. 524 (#[1553](https://github.com/nix-rust/nix/pull/1553)) 525- Added `ENOTRECOVERABLE` and `EOWNERDEAD` error codes on DragonFly. 526 (#[1665](https://github.com/nix-rust/nix/pull/1665)) 527- Implemented `Read` and `Write` for `&PtyMaster` 528 (#[1664](https://github.com/nix-rust/nix/pull/1664)) 529- Added `MSG_NOSIGNAL` for Android, Dragonfly, FreeBSD, Fuchsia, Haiku, Illumos, Linux, NetBSD, OpenBSD and Solaris. 530 (#[1670](https://github.com/nix-rust/nix/pull/1670)) 531- Added `waitid`. 532 (#[1584](https://github.com/nix-rust/nix/pull/1584)) 533- Added `Ipv6DontFrag` for android, iOS, linux and macOS. 534- Added `IpDontFrag` for iOS, macOS. 535 (#[1692](https://github.com/nix-rust/nix/pull/1692)) 536 537### Changed 538 539- `mqueue` functions now operate on a distinct type, `nix::mqueue::MqdT`. 540 Accessors take this type by reference, not by value. 541 (#[1639](https://github.com/nix-rust/nix/pull/1639)) 542- Removed `SigSet::extend` in favor of `<SigSet as Extend<Signal>>::extend`. 543 Because of this change, you now need `use std::iter::Extend` to call `extend` 544 on a `SigSet`. 545 (#[1553](https://github.com/nix-rust/nix/pull/1553)) 546- Removed the the `PATH_MAX` restriction from APIs accepting paths. Paths 547 will now be allocated on the heap if they are too long. In addition, large 548 instruction count improvements (~30x) were made to path handling. 549 (#[1656](https://github.com/nix-rust/nix/pull/1656)) 550- Changed `getrlimit` and `setrlimit` to use `rlim_t` directly 551 instead of `Option<rlim_t>`. 552 (#[1668](https://github.com/nix-rust/nix/pull/1668)) 553- Deprecated `InetAddr` and `SockAddr` in favor of `SockaddrIn`, `SockaddrIn6`, 554 and `SockaddrStorage`. 555 (#[1684](https://github.com/nix-rust/nix/pull/1684)) 556- Deprecated `IpAddr`, `Ipv4Addr`, and `Ipv6Addr` in favor of their equivalents 557 from the standard library. 558 (#[1685](https://github.com/nix-rust/nix/pull/1685)) 559- `uname` now returns a `Result<UtsName>` instead of just a `UtsName` and 560 ignoring failures from libc. And getters on the `UtsName` struct now return 561 an `&OsStr` instead of `&str`. 562 (#[1672](https://github.com/nix-rust/nix/pull/1672)) 563- Replaced `IoVec` with `IoSlice` and `IoSliceMut`, and replaced `IoVec::from_slice` with 564 `IoSlice::new`. (#[1643](https://github.com/nix-rust/nix/pull/1643)) 565 566### Fixed 567 568- `InetAddr::from_std` now sets the `sin_len`/`sin6_len` fields on the BSDs. 569 (#[1642](https://github.com/nix-rust/nix/pull/1642)) 570- Fixed a panic in `LinkAddr::addr`. That function now returns an `Option`. 571 (#[1675](https://github.com/nix-rust/nix/pull/1675)) 572 (#[1677](https://github.com/nix-rust/nix/pull/1677)) 573 574### Removed 575 576- Removed public access to the inner fields of `NetlinkAddr`, `AlgAddr`, 577 `SysControlAddr`, `LinkAddr`, and `VsockAddr`. 578 (#[1614](https://github.com/nix-rust/nix/pull/1614)) 579- Removed `EventFlag::EV_SYSFLAG`. 580 (#[1635](https://github.com/nix-rust/nix/pull/1635)) 581 582## [0.23.1] - 2021-12-16 583 584### Changed 585 586- Relaxed the bitflags requirement from 1.3.1 to 1.1. This partially reverts 587 #1492. From now on, the MSRV is not guaranteed to work with all versions of 588 all dependencies, just with some version of all dependencies. 589 (#[1607](https://github.com/nix-rust/nix/pull/1607)) 590 591### Fixed 592 593- Fixed soundness issues in `FdSet::insert`, `FdSet::remove`, and 594 `FdSet::contains` involving file descriptors outside of the range 595 `0..FD_SETSIZE`. 596 (#[1575](https://github.com/nix-rust/nix/pull/1575)) 597 598## [0.23.0] - 2021-09-28 599### Added 600 601- Added the `LocalPeerCred` sockopt. 602 (#[1482](https://github.com/nix-rust/nix/pull/1482)) 603- Added `TimeSpec::from_duration` and `TimeSpec::from_timespec` 604 (#[1465](https://github.com/nix-rust/nix/pull/1465)) 605- Added `IPV6_V6ONLY` sockopt. 606 (#[1470](https://github.com/nix-rust/nix/pull/1470)) 607- Added `impl From<User> for libc::passwd` trait implementation to convert a `User` 608 into a `libc::passwd`. Consumes the `User` struct to give ownership over 609 the member pointers. 610 (#[1471](https://github.com/nix-rust/nix/pull/1471)) 611- Added `pthread_kill`. 612 (#[1472](https://github.com/nix-rust/nix/pull/1472)) 613- Added `mknodat`. 614 (#[1473](https://github.com/nix-rust/nix/pull/1473)) 615- Added `setrlimit` and `getrlimit`. 616 (#[1302](https://github.com/nix-rust/nix/pull/1302)) 617- Added `ptrace::interrupt` method for platforms that support `PTRACE_INTERRUPT` 618 (#[1422](https://github.com/nix-rust/nix/pull/1422)) 619- Added `IP6T_SO_ORIGINAL_DST` sockopt. 620 (#[1490](https://github.com/nix-rust/nix/pull/1490)) 621- Added the `PTRACE_EVENT_STOP` variant to the `sys::ptrace::Event` enum 622 (#[1335](https://github.com/nix-rust/nix/pull/1335)) 623- Exposed `SockAddr::from_raw_sockaddr` 624 (#[1447](https://github.com/nix-rust/nix/pull/1447)) 625- Added `TcpRepair` 626 (#[1503](https://github.com/nix-rust/nix/pull/1503)) 627- Enabled `pwritev` and `preadv` for more operating systems. 628 (#[1511](https://github.com/nix-rust/nix/pull/1511)) 629- Added support for `TCP_MAXSEG` TCP Maximum Segment Size socket options 630 (#[1292](https://github.com/nix-rust/nix/pull/1292)) 631- Added `Ipv4RecvErr` and `Ipv6RecvErr` sockopts and associated control messages. 632 (#[1514](https://github.com/nix-rust/nix/pull/1514)) 633- Added `AsRawFd` implementation on `PollFd`. 634 (#[1516](https://github.com/nix-rust/nix/pull/1516)) 635- Added `Ipv4Ttl` and `Ipv6Ttl` sockopts. 636 (#[1515](https://github.com/nix-rust/nix/pull/1515)) 637- Added `MAP_EXCL`, `MAP_ALIGNED_SUPER`, and `MAP_CONCEAL` mmap flags, and 638 exposed `MAP_ANONYMOUS` for all operating systems. 639 (#[1522](https://github.com/nix-rust/nix/pull/1522)) 640 (#[1525](https://github.com/nix-rust/nix/pull/1525)) 641 (#[1531](https://github.com/nix-rust/nix/pull/1531)) 642 (#[1534](https://github.com/nix-rust/nix/pull/1534)) 643- Added read/write accessors for 'events' on `PollFd`. 644 (#[1517](https://github.com/nix-rust/nix/pull/1517)) 645 646### Changed 647 648- `FdSet::{contains, highest, fds}` no longer require a mutable reference. 649 (#[1464](https://github.com/nix-rust/nix/pull/1464)) 650- `User::gecos` and corresponding `libc::passwd::pw_gecos` are supported on 651 64-bit Android, change conditional compilation to include the field in 652 64-bit Android builds 653 (#[1471](https://github.com/nix-rust/nix/pull/1471)) 654- `eventfd`s are supported on Android, change conditional compilation to 655 include `sys::eventfd::eventfd` and `sys::eventfd::EfdFlags`for Android 656 builds. 657 (#[1481](https://github.com/nix-rust/nix/pull/1481)) 658- Most enums that come from C, for example `Errno`, are now marked as 659 `#[non_exhaustive]`. 660 (#[1474](https://github.com/nix-rust/nix/pull/1474)) 661- Many more functions, mostly contructors, are now `const`. 662 (#[1476](https://github.com/nix-rust/nix/pull/1476)) 663 (#[1492](https://github.com/nix-rust/nix/pull/1492)) 664- `sys::event::KEvent::filter` now returns a `Result` instead of being 665 infalliable. The only cases where it will now return an error are cases 666 where it previously would've had undefined behavior. 667 (#[1484](https://github.com/nix-rust/nix/pull/1484)) 668- Minimum supported Rust version is now 1.46.0. 669 ([#1492](https://github.com/nix-rust/nix/pull/1492)) 670- Rework `UnixAddr` to encapsulate internals better in order to fix soundness 671 issues. No longer allows creating a `UnixAddr` from a raw `sockaddr_un`. 672 ([#1496](https://github.com/nix-rust/nix/pull/1496)) 673- Raised bitflags to 1.3.0 and the MSRV to 1.46.0. 674 ([#1492](https://github.com/nix-rust/nix/pull/1492)) 675 676### Fixed 677 678- `posix_fadvise` now returns errors in the conventional way, rather than as a 679 non-zero value in `Ok()`. 680 (#[1538](https://github.com/nix-rust/nix/pull/1538)) 681- Added more errno definitions for better backwards compatibility with 682 Nix 0.21.0. 683 (#[1467](https://github.com/nix-rust/nix/pull/1467)) 684- Fixed potential undefined behavior in `Signal::try_from` on some platforms. 685 (#[1484](https://github.com/nix-rust/nix/pull/1484)) 686- Fixed buffer overflow in `unistd::getgrouplist`. 687 (#[1545](https://github.com/nix-rust/nix/pull/1545)) 688 689 690### Removed 691 692- Removed a couple of termios constants on redox that were never actually 693 supported. 694 (#[1483](https://github.com/nix-rust/nix/pull/1483)) 695- Removed `nix::sys::signal::NSIG`. It was of dubious utility, and not correct 696 for all platforms. 697 (#[1484](https://github.com/nix-rust/nix/pull/1484)) 698- Removed support for 32-bit Apple targets, since they've been dropped by both 699 Rustc and Xcode. 700 (#[1492](https://github.com/nix-rust/nix/pull/1492)) 701- Deprecated `SockAddr/InetAddr::to_str` in favor of `ToString::to_string` 702 (#[1495](https://github.com/nix-rust/nix/pull/1495)) 703- Removed `SigevNotify` on OpenBSD and Redox. 704 (#[1511](https://github.com/nix-rust/nix/pull/1511)) 705 706## [0.22.3] - 22 January 2022 707### Changed 708- Relaxed the bitflags requirement from 1.3.1 to 1.1. This partially reverts 709 #1492. From now on, the MSRV is not guaranteed to work with all versions of 710 all dependencies, just with some version of all dependencies. 711 (#[1607](https://github.com/nix-rust/nix/pull/1607)) 712 713## [0.22.2] - 28 September 2021 714### Fixed 715- Fixed buffer overflow in `unistd::getgrouplist`. 716 (#[1545](https://github.com/nix-rust/nix/pull/1545)) 717- Added more errno definitions for better backwards compatibility with 718 Nix 0.21.0. 719 (#[1467](https://github.com/nix-rust/nix/pull/1467)) 720 721## [0.22.1] - 13 August 2021 722### Fixed 723- Locked bitflags to < 1.3.0 to fix the build with rust < 1.46.0. 724 725### Removed 726- Removed a couple of termios constants on redox that were never actually 727 supported. 728 (#[1483](https://github.com/nix-rust/nix/pull/1483)) 729 730## [0.22.0] - 9 July 2021 731### Added 732- Added `if_nameindex` (#[1445](https://github.com/nix-rust/nix/pull/1445)) 733- Added `nmount` for FreeBSD. 734 (#[1453](https://github.com/nix-rust/nix/pull/1453)) 735- Added `IpFreebind` socket option (sockopt) on Linux, Fuchsia and Android. 736 (#[1456](https://github.com/nix-rust/nix/pull/1456)) 737- Added `TcpUserTimeout` socket option (sockopt) on Linux and Fuchsia. 738 (#[1457](https://github.com/nix-rust/nix/pull/1457)) 739- Added `renameat2` for Linux 740 (#[1458](https://github.com/nix-rust/nix/pull/1458)) 741- Added `RxqOvfl` support on Linux, Fuchsia and Android. 742 (#[1455](https://github.com/nix-rust/nix/pull/1455)) 743 744### Changed 745- `ptsname_r` now returns a lossily-converted string in the event of bad UTF, 746 just like `ptsname`. 747 ([#1446](https://github.com/nix-rust/nix/pull/1446)) 748- Nix's error type is now a simple wrapper around the platform's Errno. This 749 means it is now `Into<std::io::Error>`. It's also `Clone`, `Copy`, `Eq`, and 750 has a small fixed size. It also requires less typing. For example, the old 751 enum variant `nix::Error::Sys(nix::errno::Errno::EINVAL)` is now simply 752 `nix::Error::EINVAL`. 753 ([#1446](https://github.com/nix-rust/nix/pull/1446)) 754 755## [0.21.2] - 29 September 2021 756### Fixed 757- Fixed buffer overflow in `unistd::getgrouplist`. 758 (#[1545](https://github.com/nix-rust/nix/pull/1545)) 759 760## [0.21.1] - 13 August 2021 761### Fixed 762- Locked bitflags to < 1.3.0 to fix the build with rust < 1.46.0. 763 764### Removed 765- Removed a couple of termios constants on redox that were never actually 766 supported. 767 (#[1483](https://github.com/nix-rust/nix/pull/1483)) 768 769## [0.21.0] - 31 May 2021 770### Added 771- Added `getresuid` and `getresgid` 772 (#[1430](https://github.com/nix-rust/nix/pull/1430)) 773- Added TIMESTAMPNS support for linux 774 (#[1402](https://github.com/nix-rust/nix/pull/1402)) 775- Added `sendfile64` (#[1439](https://github.com/nix-rust/nix/pull/1439)) 776- Added `MS_LAZYTIME` to `MsFlags` 777 (#[1437](https://github.com/nix-rust/nix/pull/1437)) 778 779### Changed 780- Made `forkpty` unsafe, like `fork` 781 (#[1390](https://github.com/nix-rust/nix/pull/1390)) 782- Made `Uid`, `Gid` and `Pid` methods `from_raw` and `as_raw` a `const fn` 783 (#[1429](https://github.com/nix-rust/nix/pull/1429)) 784- Made `Uid::is_root` a `const fn` 785 (#[1429](https://github.com/nix-rust/nix/pull/1429)) 786- `AioCb` is now always pinned. Once a `libc::aiocb` gets sent to the kernel, 787 its address in memory must not change. Nix now enforces that by using 788 `std::pin`. Most users won't need to change anything, except when using 789 `aio_suspend`. See that method's documentation for the new usage. 790 (#[1440](https://github.com/nix-rust/nix/pull/1440)) 791- `LioCb` is now constructed using a distinct `LioCbBuilder` struct. This 792 avoids a soundness issue with the old `LioCb`. Usage is similar but 793 construction now uses the builder pattern. See the documentation for 794 details. 795 (#[1440](https://github.com/nix-rust/nix/pull/1440)) 796- Minimum supported Rust version is now 1.41.0. 797 ([#1440](https://github.com/nix-rust/nix/pull/1440)) 798- Errno aliases are now associated consts on `Errno`, instead of consts in the 799 `errno` module. 800 (#[1452](https://github.com/nix-rust/nix/pull/1452)) 801 802### Fixed 803- Allow `sockaddr_ll` size, as reported by the Linux kernel, to be smaller then it's definition 804 (#[1395](https://github.com/nix-rust/nix/pull/1395)) 805- Fix spurious errors using `sendmmsg` with multiple cmsgs 806 (#[1414](https://github.com/nix-rust/nix/pull/1414)) 807- Added `Errno::EOPNOTSUPP` to FreeBSD, where it was missing. 808 (#[1452](https://github.com/nix-rust/nix/pull/1452)) 809 810### Removed 811 812- Removed `sys::socket::accept4` from Android arm because libc removed it in 813 version 0.2.87. 814 ([#1399](https://github.com/nix-rust/nix/pull/1399)) 815- `AioCb::from_boxed_slice` and `AioCb::from_boxed_mut_slice` have been 816 removed. They were useful with earlier versions of Rust, but should no 817 longer be needed now that async/await are available. `AioCb`s now work 818 exclusively with borrowed buffers, not owned ones. 819 (#[1440](https://github.com/nix-rust/nix/pull/1440)) 820- Removed some Errno values from platforms where they aren't actually defined. 821 (#[1452](https://github.com/nix-rust/nix/pull/1452)) 822 823## [0.20.2] - 28 September 2021 824### Fixed 825- Fixed buffer overflow in `unistd::getgrouplist`. 826 (#[1545](https://github.com/nix-rust/nix/pull/1545)) 827 828## [0.20.1] - 13 August 2021 829### Fixed 830- Locked bitflags to < 1.3.0 to fix the build with rust < 1.46.0. 831 832### Removed 833- Removed a couple of termios constants on redox that were never actually 834 supported. 835 (#[1483](https://github.com/nix-rust/nix/pull/1483)) 836 837## [0.20.0] - 20 February 2021 838### Added 839 840- Added a `passwd` field to `Group` (#[1338](https://github.com/nix-rust/nix/pull/1338)) 841- Added `mremap` (#[1306](https://github.com/nix-rust/nix/pull/1306)) 842- Added `personality` (#[1331](https://github.com/nix-rust/nix/pull/1331)) 843- Added limited Fuchsia support (#[1285](https://github.com/nix-rust/nix/pull/1285)) 844- Added `getpeereid` (#[1342](https://github.com/nix-rust/nix/pull/1342)) 845- Implemented `IntoIterator` for `Dir` 846 (#[1333](https://github.com/nix-rust/nix/pull/1333)). 847 848### Changed 849 850- Minimum supported Rust version is now 1.40.0. 851 ([#1356](https://github.com/nix-rust/nix/pull/1356)) 852- i686-apple-darwin has been demoted to Tier 2 support, because it's deprecated 853 by Xcode. 854 (#[1350](https://github.com/nix-rust/nix/pull/1350)) 855- Fixed calling `recvfrom` on an `AddrFamily::Packet` socket 856 (#[1344](https://github.com/nix-rust/nix/pull/1344)) 857 858### Fixed 859- `TimerFd` now closes the underlying fd on drop. 860 ([#1381](https://github.com/nix-rust/nix/pull/1381)) 861- Define `*_MAGIC` filesystem constants on Linux s390x 862 (#[1372](https://github.com/nix-rust/nix/pull/1372)) 863- mqueue, sysinfo, timespec, statfs, test_ptrace_syscall() on x32 864 (#[1366](https://github.com/nix-rust/nix/pull/1366)) 865 866### Removed 867 868- `Dir`, `SignalFd`, and `PtyMaster` are no longer `Clone`. 869 (#[1382](https://github.com/nix-rust/nix/pull/1382)) 870- Removed `SockLevel`, which hasn't been used for a few years 871 (#[1362](https://github.com/nix-rust/nix/pull/1362)) 872- Removed both `Copy` and `Clone` from `TimerFd`. 873 ([#1381](https://github.com/nix-rust/nix/pull/1381)) 874 875## [0.19.1] - 28 November 2020 876### Fixed 877- Fixed bugs in `recvmmsg`. 878 (#[1341](https://github.com/nix-rust/nix/pull/1341)) 879 880## [0.19.0] - 6 October 2020 881### Added 882- Added Netlink protocol families to the `SockProtocol` enum 883 (#[1289](https://github.com/nix-rust/nix/pull/1289)) 884- Added `clock_gettime`, `clock_settime`, `clock_getres`, 885 `clock_getcpuclockid` functions and `ClockId` struct. 886 (#[1281](https://github.com/nix-rust/nix/pull/1281)) 887- Added wrapper functions for `PTRACE_SYSEMU` and `PTRACE_SYSEMU_SINGLESTEP`. 888 (#[1300](https://github.com/nix-rust/nix/pull/1300)) 889- Add support for Vsock on Android rather than just Linux. 890 (#[1301](https://github.com/nix-rust/nix/pull/1301)) 891- Added `TCP_KEEPCNT` and `TCP_KEEPINTVL` TCP keepalive options. 892 (#[1283](https://github.com/nix-rust/nix/pull/1283)) 893### Changed 894- Expose `SeekData` and `SeekHole` on all Linux targets 895 (#[1284](https://github.com/nix-rust/nix/pull/1284)) 896- Changed unistd::{execv,execve,execvp,execvpe,fexecve,execveat} to take both `&[&CStr]` and `&[CString]` as its list argument(s). 897 (#[1278](https://github.com/nix-rust/nix/pull/1278)) 898- Made `unistd::fork` an unsafe funtion, bringing it in line with [libstd's decision](https://github.com/rust-lang/rust/pull/58059). 899 (#[1293](https://github.com/nix-rust/nix/pull/1293)) 900 901## [0.18.0] - 26 July 2020 902### Added 903- Added `fchown(2)` wrapper. 904 (#[1257](https://github.com/nix-rust/nix/pull/1257)) 905- Added support on linux systems for `MAP_HUGE_`_`SIZE`_ family of flags. 906 (#[1211](https://github.com/nix-rust/nix/pull/1211)) 907- Added support for `F_OFD_*` `fcntl` commands on Linux and Android. 908 (#[1195](https://github.com/nix-rust/nix/pull/1195)) 909- Added `env::clearenv()`: calls `libc::clearenv` on platforms 910 where it's available, and clears the environment of all variables 911 via `std::env::vars` and `std::env::remove_var` on others. 912 (#[1185](https://github.com/nix-rust/nix/pull/1185)) 913- `FsType` inner value made public. 914 (#[1187](https://github.com/nix-rust/nix/pull/1187)) 915- Added `unistd::setfsuid` and `unistd::setfsgid` to set the user or group 916 identity for filesystem checks per-thread. 917 (#[1163](https://github.com/nix-rust/nix/pull/1163)) 918- Derived `Ord`, `PartialOrd` for `unistd::Pid` (#[1189](https://github.com/nix-rust/nix/pull/1189)) 919- Added `select::FdSet::fds` method to iterate over file descriptors in a set. 920 ([#1207](https://github.com/nix-rust/nix/pull/1207)) 921- Added support for UDP generic segmentation offload (GSO) and generic 922 receive offload (GRO) ([#1209](https://github.com/nix-rust/nix/pull/1209)) 923- Added support for `sendmmsg` and `recvmmsg` calls 924 (#[1208](https://github.com/nix-rust/nix/pull/1208)) 925- Added support for `SCM_CREDS` messages (`UnixCredentials`) on FreeBSD/DragonFly 926 (#[1216](https://github.com/nix-rust/nix/pull/1216)) 927- Added `BindToDevice` socket option (sockopt) on Linux 928 (#[1233](https://github.com/nix-rust/nix/pull/1233)) 929- Added `EventFilter` bitflags for `EV_DISPATCH` and `EV_RECEIPT` on OpenBSD. 930 (#[1252](https://github.com/nix-rust/nix/pull/1252)) 931- Added support for `Ipv4PacketInfo` and `Ipv6PacketInfo` to `ControlMessage`. 932 (#[1222](https://github.com/nix-rust/nix/pull/1222)) 933- `CpuSet` and `UnixCredentials` now implement `Default`. 934 (#[1244](https://github.com/nix-rust/nix/pull/1244)) 935- Added `unistd::ttyname` 936 (#[1259](https://github.com/nix-rust/nix/pull/1259)) 937- Added support for `Ipv4PacketInfo` and `Ipv6PacketInfo` to `ControlMessage` for iOS and Android. 938 (#[1265](https://github.com/nix-rust/nix/pull/1265)) 939- Added support for `TimerFd`. 940 (#[1261](https://github.com/nix-rust/nix/pull/1261)) 941 942### Changed 943- Changed `fallocate` return type from `c_int` to `()` (#[1201](https://github.com/nix-rust/nix/pull/1201)) 944- Enabled `sys::ptrace::setregs` and `sys::ptrace::getregs` on x86_64-unknown-linux-musl target 945 (#[1198](https://github.com/nix-rust/nix/pull/1198)) 946- On Linux, `ptrace::write` is now an `unsafe` function. Caveat programmer. 947 (#[1245](https://github.com/nix-rust/nix/pull/1245)) 948- `execv`, `execve`, `execvp` and `execveat` in `::nix::unistd` and `reboot` in 949 `::nix::sys::reboot` now return `Result<Infallible>` instead of `Result<Void>` (#[1239](https://github.com/nix-rust/nix/pull/1239)) 950- `sys::socket::sockaddr_storage_to_addr` is no longer `unsafe`. So is 951 `offset_of!`. 952- `sys::socket::sockaddr_storage_to_addr`, `offset_of!`, and `Errno::clear` are 953 no longer `unsafe`. 954- `SockAddr::as_ffi_pair`,`sys::socket::sockaddr_storage_to_addr`, `offset_of!`, 955 and `Errno::clear` are no longer `unsafe`. 956 (#[1244](https://github.com/nix-rust/nix/pull/1244)) 957- Several `Inotify` methods now take `self` by value instead of by reference 958 (#[1244](https://github.com/nix-rust/nix/pull/1244)) 959- `nix::poll::ppoll`: `timeout` parameter is now optional, None is equivalent for infinite timeout. 960 961### Fixed 962 963- Fixed `getsockopt`. The old code produced UB which triggers a panic with 964 Rust 1.44.0. 965 (#[1214](https://github.com/nix-rust/nix/pull/1214)) 966 967- Fixed a bug in nix::unistd that would result in an infinite loop 968 when a group or user lookup required a buffer larger than 969 16KB. (#[1198](https://github.com/nix-rust/nix/pull/1198)) 970- Fixed unaligned casting of `cmsg_data` to `af_alg_iv` (#[1206](https://github.com/nix-rust/nix/pull/1206)) 971- Fixed `readlink`/`readlinkat` when reading symlinks longer than `PATH_MAX` (#[1231](https://github.com/nix-rust/nix/pull/1231)) 972- `PollFd`, `EpollEvent`, `IpMembershipRequest`, `Ipv6MembershipRequest`, 973 `TimeVal`, and `IoVec` are now `repr(transparent)`. This is required for 974 correctness's sake across all architectures and compilers, though now bugs 975 have been reported so far. 976 (#[1243](https://github.com/nix-rust/nix/pull/1243)) 977- Fixed unaligned pointer read in `Inotify::read_events`. 978 (#[1244](https://github.com/nix-rust/nix/pull/1244)) 979 980### Removed 981 982- Removed `sys::socket::addr::from_libc_sockaddr` from the public API. 983 (#[1215](https://github.com/nix-rust/nix/pull/1215)) 984- Removed `sys::termios::{get_libc_termios, get_libc_termios_mut, update_wrapper` 985 from the public API. These were previously hidden in the docs but still usable 986 by downstream. 987 (#[1235](https://github.com/nix-rust/nix/pull/1235)) 988 989- Nix no longer implements `NixPath` for `Option<P> where P: NixPath`. Most 990 Nix functions that accept `NixPath` arguments can't do anything useful with 991 `None`. The exceptions (`mount` and `quotactl_sync`) already take explicitly 992 optional arguments. 993 (#[1242](https://github.com/nix-rust/nix/pull/1242)) 994 995- Removed `unistd::daemon` and `unistd::pipe2` on OSX and ios 996 (#[1255](https://github.com/nix-rust/nix/pull/1255)) 997 998- Removed `sys::event::FilterFlag::NOTE_EXIT_REPARENTED` and 999 `sys::event::FilterFlag::NOTE_REAP` on OSX and ios. 1000 (#[1255](https://github.com/nix-rust/nix/pull/1255)) 1001 1002- Removed `sys::ptrace::ptrace` on Android and Linux. 1003 (#[1255](https://github.com/nix-rust/nix/pull/1255)) 1004 1005- Dropped support for powerpc64-unknown-linux-gnu 1006 (#[1266](https://github.com/nix-rust/nix/pull/1268)) 1007 1008## [0.17.0] - 3 February 2020 1009### Added 1010- Add `CLK_TCK` to `SysconfVar` 1011 (#[1177](https://github.com/nix-rust/nix/pull/1177)) 1012### Removed 1013- Removed deprecated Error::description from error types 1014 (#[1175](https://github.com/nix-rust/nix/pull/1175)) 1015 1016## [0.16.1] - 23 December 2019 1017### Fixed 1018 1019- Fixed the build for OpenBSD 1020 (#[1168](https://github.com/nix-rust/nix/pull/1168)) 1021 1022## [0.16.0] - 1 December 2019 1023### Added 1024- Added `ptrace::seize()`: similar to `attach()` on Linux 1025 but with better-defined semantics. 1026 (#[1154](https://github.com/nix-rust/nix/pull/1154)) 1027 1028- Added `Signal::as_str()`: returns signal name as `&'static str` 1029 (#[1138](https://github.com/nix-rust/nix/pull/1138)) 1030 1031- Added `posix_fallocate`. 1032 ([#1105](https://github.com/nix-rust/nix/pull/1105)) 1033 1034- Implemented `Default` for `FdSet` 1035 ([#1107](https://github.com/nix-rust/nix/pull/1107)) 1036 1037- Added `NixPath::is_empty`. 1038 ([#1107](https://github.com/nix-rust/nix/pull/1107)) 1039 1040- Added `mkfifoat` 1041 ([#1133](https://github.com/nix-rust/nix/pull/1133)) 1042 1043- Added `User::from_uid`, `User::from_name`, `User::from_gid` and 1044 `Group::from_name`, 1045 ([#1139](https://github.com/nix-rust/nix/pull/1139)) 1046 1047- Added `linkat` 1048 ([#1101](https://github.com/nix-rust/nix/pull/1101)) 1049 1050- Added `sched_getaffinity`. 1051 ([#1148](https://github.com/nix-rust/nix/pull/1148)) 1052 1053- Added optional `Signal` argument to `ptrace::{detach, syscall}` for signal 1054 injection. ([#1083](https://github.com/nix-rust/nix/pull/1083)) 1055 1056### Changed 1057- `sys::termios::BaudRate` now implements `TryFrom<speed_t>` instead of 1058 `From<speed_t>`. The old `From` implementation would panic on failure. 1059 ([#1159](https://github.com/nix-rust/nix/pull/1159)) 1060 1061- `sys::socket::ControlMessage::ScmCredentials` and 1062 `sys::socket::ControlMessageOwned::ScmCredentials` now wrap `UnixCredentials` 1063 rather than `libc::ucred`. 1064 ([#1160](https://github.com/nix-rust/nix/pull/1160)) 1065 1066- `sys::socket::recvmsg` now takes a plain `Vec` instead of a `CmsgBuffer` 1067 implementor. If you were already using `cmsg_space!`, then you needn't worry. 1068 ([#1156](https://github.com/nix-rust/nix/pull/1156)) 1069 1070- `sys::socket::recvfrom` now returns 1071 `Result<(usize, Option<SockAddr>)>` instead of `Result<(usize, SockAddr)>`. 1072 ([#1145](https://github.com/nix-rust/nix/pull/1145)) 1073 1074- `Signal::from_c_int` has been replaced by `Signal::try_from` 1075 ([#1113](https://github.com/nix-rust/nix/pull/1113)) 1076 1077- Changed `readlink` and `readlinkat` to return `OsString` 1078 ([#1109](https://github.com/nix-rust/nix/pull/1109)) 1079 1080 ```rust 1081 # use nix::fcntl::{readlink, readlinkat}; 1082 // the buffer argument of `readlink` and `readlinkat` has been removed, 1083 // and the return value is now an owned type (`OsString`). 1084 // Existing code can be updated by removing the buffer argument 1085 // and removing any clone or similar operation on the output 1086 1087 // old code `readlink(&path, &mut buf)` can be replaced with the following 1088 let _: OsString = readlink(&path); 1089 1090 // old code `readlinkat(dirfd, &path, &mut buf)` can be replaced with the following 1091 let _: OsString = readlinkat(dirfd, &path); 1092 ``` 1093 1094- Minimum supported Rust version is now 1.36.0. 1095 ([#1108](https://github.com/nix-rust/nix/pull/1108)) 1096 1097- `Ipv4Addr::octets`, `Ipv4Addr::to_std`, `Error::as_errno`, 1098 `ForkResult::is_child`, `ForkResult::is_parent`, `Gid::as_raw`, 1099 `Uid::is_root`, `Uid::as_raw`, `Pid::as_raw`, and `PollFd::revents` now take 1100 `self` by value. 1101 ([#1107](https://github.com/nix-rust/nix/pull/1107)) 1102 1103- Type `&CString` for parameters of `exec(v|ve|vp|vpe|veat)` are changed to `&CStr`. 1104 ([#1121](https://github.com/nix-rust/nix/pull/1121)) 1105 1106### Fixed 1107- Fix length of abstract socket addresses 1108 ([#1120](https://github.com/nix-rust/nix/pull/1120)) 1109 1110- Fix initialization of msghdr in recvmsg/sendmsg when built with musl 1111 ([#1136](https://github.com/nix-rust/nix/pull/1136)) 1112 1113### Removed 1114- Remove the deprecated `CmsgSpace`. 1115 ([#1156](https://github.com/nix-rust/nix/pull/1156)) 1116 1117## [0.15.0] - 10 August 2019 1118### Added 1119- Added `MSG_WAITALL` to `MsgFlags` in `sys::socket`. 1120 ([#1079](https://github.com/nix-rust/nix/pull/1079)) 1121- Implemented `Clone`, `Copy`, `Debug`, `Eq`, `Hash`, and `PartialEq` for most 1122 types that support them. ([#1035](https://github.com/nix-rust/nix/pull/1035)) 1123- Added `copy_file_range` wrapper 1124 ([#1069](https://github.com/nix-rust/nix/pull/1069)) 1125- Add `mkdirat`. 1126 ([#1084](https://github.com/nix-rust/nix/pull/1084)) 1127- Add `posix_fadvise`. 1128 ([#1089](https://github.com/nix-rust/nix/pull/1089)) 1129- Added `AF_VSOCK` to `AddressFamily`. 1130 ([#1091](https://github.com/nix-rust/nix/pull/1091)) 1131- Add `unlinkat` 1132 ([#1058](https://github.com/nix-rust/nix/pull/1058)) 1133- Add `renameat`. 1134 ([#1097](https://github.com/nix-rust/nix/pull/1097)) 1135 1136### Changed 1137- Support for `ifaddrs` now present when building for Android. 1138 ([#1077](https://github.com/nix-rust/nix/pull/1077)) 1139- Minimum supported Rust version is now 1.31.0 1140 ([#1035](https://github.com/nix-rust/nix/pull/1035)) 1141 ([#1095](https://github.com/nix-rust/nix/pull/1095)) 1142- Now functions `statfs()` and `fstatfs()` return result with `Statfs` wrapper 1143 ([#928](https://github.com/nix-rust/nix/pull/928)) 1144 1145### Fixed 1146- Enabled `sched_yield` for all nix hosts. 1147 ([#1090](https://github.com/nix-rust/nix/pull/1090)) 1148 1149## [0.14.1] - 2019-06-06 1150### Added 1151- Macros exported by `nix` may now be imported via `use` on the Rust 2018 1152 edition without importing helper macros on Linux targets. 1153 ([#1066](https://github.com/nix-rust/nix/pull/1066)) 1154 1155 For example, in Rust 2018, the `ioctl_read_bad!` macro can now be imported 1156 without importing the `convert_ioctl_res!` macro. 1157 1158 ```rust 1159 use nix::ioctl_read_bad; 1160 1161 ioctl_read_bad!(tcgets, libc::TCGETS, libc::termios); 1162 ``` 1163 1164### Changed 1165- Changed some public types from reexports of libc types like `uint32_t` to the 1166 native equivalents like `u32.` 1167 ([#1072](https://github.com/nix-rust/nix/pull/1072/commits)) 1168 1169### Fixed 1170- Fix the build on Android and Linux/mips with recent versions of libc. 1171 ([#1072](https://github.com/nix-rust/nix/pull/1072/commits)) 1172 1173## [0.14.0] - 2019-05-21 1174### Added 1175- Add IP_RECVIF & IP_RECVDSTADDR. Enable IP_PKTINFO and IP6_PKTINFO on netbsd/openbsd. 1176 ([#1002](https://github.com/nix-rust/nix/pull/1002)) 1177- Added `inotify_init1`, `inotify_add_watch` and `inotify_rm_watch` wrappers for 1178 Android and Linux. ([#1016](https://github.com/nix-rust/nix/pull/1016)) 1179- Add `ALG_SET_IV`, `ALG_SET_OP` and `ALG_SET_AEAD_ASSOCLEN` control messages and `AF_ALG` 1180 socket types on Linux and Android ([#1031](https://github.com/nix-rust/nix/pull/1031)) 1181- Add killpg 1182 ([#1034](https://github.com/nix-rust/nix/pull/1034)) 1183- Added ENOTSUP errno support for Linux and Android. 1184 ([#969](https://github.com/nix-rust/nix/pull/969)) 1185- Add several errno constants from OpenBSD 6.2 1186 ([#1036](https://github.com/nix-rust/nix/pull/1036)) 1187- Added `from_std` and `to_std` methods for `sys::socket::IpAddr` 1188 ([#1043](https://github.com/nix-rust/nix/pull/1043)) 1189- Added `nix::unistd:seteuid` and `nix::unistd::setegid` for those platforms that do 1190 not support `setresuid` nor `setresgid` respectively. 1191 ([#1044](https://github.com/nix-rust/nix/pull/1044)) 1192- Added a `access` wrapper 1193 ([#1045](https://github.com/nix-rust/nix/pull/1045)) 1194- Add `forkpty` 1195 ([#1042](https://github.com/nix-rust/nix/pull/1042)) 1196- Add `sched_yield` 1197 ([#1050](https://github.com/nix-rust/nix/pull/1050)) 1198 1199### Changed 1200- `PollFd` event flags renamed to `PollFlags` ([#1024](https://github.com/nix-rust/nix/pull/1024/)) 1201- `recvmsg` now returns an Iterator over `ControlMessageOwned` objects rather 1202 than `ControlMessage` objects. This is sadly not backwards-compatible. Fix 1203 code like this: 1204 ```rust 1205 if let ControlMessage::ScmRights(&fds) = cmsg { 1206 ``` 1207 1208 By replacing it with code like this: 1209 ```rust 1210 if let ControlMessageOwned::ScmRights(fds) = cmsg { 1211 ``` 1212 ([#1020](https://github.com/nix-rust/nix/pull/1020)) 1213- Replaced `CmsgSpace` with the `cmsg_space` macro. 1214 ([#1020](https://github.com/nix-rust/nix/pull/1020)) 1215 1216### Fixed 1217- Fixed multiple bugs when using `sendmsg` and `recvmsg` with ancillary control messages 1218 ([#1020](https://github.com/nix-rust/nix/pull/1020)) 1219- Macros exported by `nix` may now be imported via `use` on the Rust 2018 1220 edition without importing helper macros for BSD targets. 1221 ([#1041](https://github.com/nix-rust/nix/pull/1041)) 1222 1223 For example, in Rust 2018, the `ioctl_read_bad!` macro can now be imported 1224 without importing the `convert_ioctl_res!` macro. 1225 1226 ```rust 1227 use nix::ioctl_read_bad; 1228 1229 ioctl_read_bad!(tcgets, libc::TCGETS, libc::termios); 1230 ``` 1231 1232### Removed 1233- `Daemon`, `NOTE_REAP`, and `NOTE_EXIT_REPARENTED` are now deprecated on OSX 1234 and iOS. 1235 ([#1033](https://github.com/nix-rust/nix/pull/1033)) 1236- `PTRACE_GETREGS`, `PTRACE_SETREGS`, `PTRACE_GETFPREGS`, and 1237 `PTRACE_SETFPREGS` have been removed from some platforms where they never 1238 should've been defined in the first place. 1239 ([#1055](https://github.com/nix-rust/nix/pull/1055)) 1240 1241## [0.13.1] - 2019-06-10 1242### Changed 1243- Changed some public types from reexports of libc types like `uint32_t` to the 1244 native equivalents like `u32.` 1245 ([#1072](https://github.com/nix-rust/nix/pull/1072/commits)) 1246 1247### Fixed 1248- Fix the build on Android and Linux/mips with recent versions of libc. 1249 ([#1072](https://github.com/nix-rust/nix/pull/1072/commits)) 1250- Fixed build on Linux/arm and Linux/s390x with the latest Rust libc 1251 ([52102cb](https://github.com/nix-rust/nix/commit/52102cb76398c4dfb9ea141b98c5b01a2e050973)) 1252 1253### Removed 1254- `Daemon`, `NOTE_REAP`, and `NOTE_EXIT_REPARENTED` are now deprecated on OSX 1255 and iOS. 1256 ([#1033](https://github.com/nix-rust/nix/pull/1033)) 1257 1258## [0.13.0] - 2019-01-15 1259### Added 1260- Added PKTINFO(V4) & V6PKTINFO cmsg support - Android/FreeBSD/iOS/Linux/MacOS. 1261 ([#990](https://github.com/nix-rust/nix/pull/990)) 1262- Added support of CString type in `setsockopt`. 1263 ([#972](https://github.com/nix-rust/nix/pull/972)) 1264- Added option `TCP_CONGESTION` in `setsockopt`. 1265 ([#972](https://github.com/nix-rust/nix/pull/972)) 1266- Added `symlinkat` wrapper. 1267 ([#997](https://github.com/nix-rust/nix/pull/997)) 1268- Added `ptrace::{getregs, setregs}`. 1269 ([#1010](https://github.com/nix-rust/nix/pull/1010)) 1270- Added `nix::sys::signal::signal`. 1271 ([#817](https://github.com/nix-rust/nix/pull/817)) 1272- Added an `mprotect` wrapper. 1273 ([#991](https://github.com/nix-rust/nix/pull/991)) 1274 1275### Fixed 1276- `lutimes` never worked on OpenBSD as it is not implemented on OpenBSD. It has 1277 been removed. ([#1000](https://github.com/nix-rust/nix/pull/1000)) 1278- `fexecve` never worked on NetBSD or on OpenBSD as it is not implemented on 1279 either OS. It has been removed. ([#1000](https://github.com/nix-rust/nix/pull/1000)) 1280 1281## [0.12.1] 2019-06-08 1282### Changed 1283- Changed some public types from reexports of libc types like `uint32_t` to the 1284 native equivalents like `u32.` 1285 ([#1072](https://github.com/nix-rust/nix/pull/1072/commits)) 1286 1287### Fixed 1288- Fix the build on Android and Linux/mips with recent versions of libc. 1289 ([#1072](https://github.com/nix-rust/nix/pull/1072/commits)) 1290- Fixed build on Linux/arm and Linux/s390x with the latest Rust libc 1291 ([52102cb](https://github.com/nix-rust/nix/commit/52102cb76398c4dfb9ea141b98c5b01a2e050973)) 1292 1293### Removed 1294- `fexecve` never worked on NetBSD or on OpenBSD as it is not implemented on 1295 either OS. It has been removed. ([#1000](https://github.com/nix-rust/nix/pull/1000)) 1296- `Daemon`, `NOTE_REAP`, and `NOTE_EXIT_REPARENTED` are now deprecated on OSX 1297 and iOS. 1298 ([#1033](https://github.com/nix-rust/nix/pull/1033)) 1299 1300## [0.12.0] 2018-11-28 1301 1302### Added 1303- Added `FromStr` and `Display` impls for `nix::sys::Signal` 1304 ([#884](https://github.com/nix-rust/nix/pull/884)) 1305- Added a `sync` wrapper. 1306 ([#961](https://github.com/nix-rust/nix/pull/961)) 1307- Added a `sysinfo` wrapper. 1308 ([#922](https://github.com/nix-rust/nix/pull/922)) 1309- Support the `SO_PEERCRED` socket option and the `UnixCredentials` type on all Linux and Android targets. 1310 ([#921](https://github.com/nix-rust/nix/pull/921)) 1311- Added support for `SCM_CREDENTIALS`, allowing to send process credentials over Unix sockets. 1312 ([#923](https://github.com/nix-rust/nix/pull/923)) 1313- Added a `dir` module for reading directories (wraps `fdopendir`, `readdir`, and `rewinddir`). 1314 ([#916](https://github.com/nix-rust/nix/pull/916)) 1315- Added `kmod` module that allows loading and unloading kernel modules on Linux. 1316 ([#930](https://github.com/nix-rust/nix/pull/930)) 1317- Added `futimens` and `utimesat` wrappers ([#944](https://github.com/nix-rust/nix/pull/944)), 1318 an `lutimes` wrapper ([#967](https://github.com/nix-rust/nix/pull/967)), 1319 and a `utimes` wrapper ([#946](https://github.com/nix-rust/nix/pull/946)). 1320- Added `AF_UNSPEC` wrapper to `AddressFamily` ([#948](https://github.com/nix-rust/nix/pull/948)) 1321- Added the `mode_t` public alias within `sys::stat`. 1322 ([#954](https://github.com/nix-rust/nix/pull/954)) 1323- Added a `truncate` wrapper. 1324 ([#956](https://github.com/nix-rust/nix/pull/956)) 1325- Added a `fchownat` wrapper. 1326 ([#955](https://github.com/nix-rust/nix/pull/955)) 1327- Added support for `ptrace` on BSD operating systems ([#949](https://github.com/nix-rust/nix/pull/949)) 1328- Added `ptrace` functions for reads and writes to tracee memory and ptrace kill 1329 ([#949](https://github.com/nix-rust/nix/pull/949)) ([#958](https://github.com/nix-rust/nix/pull/958)) 1330- Added a `acct` wrapper module for enabling and disabling process accounting 1331 ([#952](https://github.com/nix-rust/nix/pull/952)) 1332- Added the `time_t` and `suseconds_t` public aliases within `sys::time`. 1333 ([#968](https://github.com/nix-rust/nix/pull/968)) 1334- Added `unistd::execvpe` for Haiku, Linux and OpenBSD 1335 ([#975](https://github.com/nix-rust/nix/pull/975)) 1336- Added `Error::as_errno`. 1337 ([#977](https://github.com/nix-rust/nix/pull/977)) 1338 1339### Changed 1340- Increased required Rust version to 1.24.1 1341 ([#900](https://github.com/nix-rust/nix/pull/900)) 1342 ([#966](https://github.com/nix-rust/nix/pull/966)) 1343 1344### Fixed 1345- Made `preadv` take immutable slice of IoVec. 1346 ([#914](https://github.com/nix-rust/nix/pull/914)) 1347- Fixed passing multiple file descriptors over Unix Sockets. 1348 ([#918](https://github.com/nix-rust/nix/pull/918)) 1349 1350## [0.11.1] 2019-06-06 1351### Changed 1352- Changed some public types from reexports of libc types like `uint32_t` to the 1353 native equivalents like `u32.` 1354 ([#1072](https://github.com/nix-rust/nix/pull/1072/commits)) 1355 1356### Fixed 1357- Fix the build on Android and Linux/mips with recent versions of libc. 1358 ([#1072](https://github.com/nix-rust/nix/pull/1072/commits)) 1359- Fixed build on Linux/arm and Linux/s390x with the latest Rust libc 1360 ([52102cb](https://github.com/nix-rust/nix/commit/52102cb76398c4dfb9ea141b98c5b01a2e050973)) 1361 1362### Removed 1363- `fexecve` never worked on NetBSD or on OpenBSD as it is not implemented on 1364 either OS. It has been removed. ([#1000](https://github.com/nix-rust/nix/pull/1000)) 1365- `Daemon`, `NOTE_REAP`, and `NOTE_EXIT_REPARENTED` are now deprecated on OSX 1366 and iOS. 1367 ([#1033](https://github.com/nix-rust/nix/pull/1033)) 1368 1369## [0.11.0] 2018-06-01 1370 1371### Added 1372- Added `sendfile` on FreeBSD and Darwin. 1373 ([#901](https://github.com/nix-rust/nix/pull/901)) 1374- Added `pselect` 1375 ([#894](https://github.com/nix-rust/nix/pull/894)) 1376- Exposed `preadv` and `pwritev` on the BSDs. 1377 ([#883](https://github.com/nix-rust/nix/pull/883)) 1378- Added `mlockall` and `munlockall` 1379 ([#876](https://github.com/nix-rust/nix/pull/876)) 1380- Added `SO_MARK` on Linux. 1381 ([#873](https://github.com/nix-rust/nix/pull/873)) 1382- Added safe support for nearly any buffer type in the `sys::aio` module. 1383 ([#872](https://github.com/nix-rust/nix/pull/872)) 1384- Added `sys::aio::LioCb` as a wrapper for `libc::lio_listio`. 1385 ([#872](https://github.com/nix-rust/nix/pull/872)) 1386- Added `unistd::getsid` 1387 ([#850](https://github.com/nix-rust/nix/pull/850)) 1388- Added `alarm`. ([#830](https://github.com/nix-rust/nix/pull/830)) 1389- Added interface flags `IFF_NO_PI, IFF_TUN, IFF_TAP` on linux-like systems. 1390 ([#853](https://github.com/nix-rust/nix/pull/853)) 1391- Added `statvfs` module to all MacOS and Linux architectures. 1392 ([#832](https://github.com/nix-rust/nix/pull/832)) 1393- Added `EVFILT_EMPTY`, `EVFILT_PROCDESC`, and `EVFILT_SENDFILE` on FreeBSD. 1394 ([#825](https://github.com/nix-rust/nix/pull/825)) 1395- Exposed `termios::cfmakesane` on FreeBSD. 1396 ([#825](https://github.com/nix-rust/nix/pull/825)) 1397- Exposed `MSG_CMSG_CLOEXEC` on *BSD. 1398 ([#825](https://github.com/nix-rust/nix/pull/825)) 1399- Added `fchmod`, `fchmodat`. 1400 ([#857](https://github.com/nix-rust/nix/pull/857)) 1401- Added `request_code_write_int!` on FreeBSD/DragonFlyBSD 1402 ([#833](https://github.com/nix-rust/nix/pull/833)) 1403 1404### Changed 1405- `Display` and `Debug` for `SysControlAddr` now includes all fields. 1406 ([#837](https://github.com/nix-rust/nix/pull/837)) 1407- `ioctl!` has been replaced with a family of `ioctl_*!` macros. 1408 ([#833](https://github.com/nix-rust/nix/pull/833)) 1409- `io!`, `ior!`, `iow!`, and `iorw!` has been renamed to `request_code_none!`, `request_code_read!`, 1410 `request_code_write!`, and `request_code_readwrite!` respectively. These have also now been exposed 1411 in the documentation. 1412 ([#833](https://github.com/nix-rust/nix/pull/833)) 1413- Enabled more `ptrace::Request` definitions for uncommon Linux platforms 1414 ([#892](https://github.com/nix-rust/nix/pull/892)) 1415- Emulation of `FD_CLOEXEC` and `O_NONBLOCK` was removed from `socket()`, `accept4()`, and 1416 `socketpair()`. 1417 ([#907](https://github.com/nix-rust/nix/pull/907)) 1418 1419### Fixed 1420- Fixed possible panics when using `SigAction::flags` on Linux 1421 ([#869](https://github.com/nix-rust/nix/pull/869)) 1422- Properly exposed 460800 and 921600 baud rates on NetBSD 1423 ([#837](https://github.com/nix-rust/nix/pull/837)) 1424- Fixed `ioctl_write_int!` on FreeBSD/DragonFlyBSD 1425 ([#833](https://github.com/nix-rust/nix/pull/833)) 1426- `ioctl_write_int!` now properly supports passing a `c_ulong` as the parameter on Linux non-musl targets 1427 ([#833](https://github.com/nix-rust/nix/pull/833)) 1428 1429### Removed 1430- Removed explicit support for the `bytes` crate from the `sys::aio` module. 1431 See `sys::aio::AioCb::from_boxed_slice` examples for alternatives. 1432 ([#872](https://github.com/nix-rust/nix/pull/872)) 1433- Removed `sys::aio::lio_listio`. Use `sys::aio::LioCb::listio` instead. 1434 ([#872](https://github.com/nix-rust/nix/pull/872)) 1435- Removed emulated `accept4()` from macos, ios, and netbsd targets 1436 ([#907](https://github.com/nix-rust/nix/pull/907)) 1437- Removed `IFF_NOTRAILERS` on OpenBSD, as it has been removed in OpenBSD 6.3 1438 ([#893](https://github.com/nix-rust/nix/pull/893)) 1439 1440## [0.10.0] 2018-01-26 1441 1442### Added 1443- Added specialized wrapper: `sys::ptrace::step` 1444 ([#852](https://github.com/nix-rust/nix/pull/852)) 1445- Added `AioCb::from_ptr` and `AioCb::from_mut_ptr` 1446 ([#820](https://github.com/nix-rust/nix/pull/820)) 1447- Added specialized wrappers: `sys::ptrace::{traceme, syscall, cont, attach}`. Using the matching routines 1448 with `sys::ptrace::ptrace` is now deprecated. 1449- Added `nix::poll` module for all platforms 1450 ([#672](https://github.com/nix-rust/nix/pull/672)) 1451- Added `nix::ppoll` function for FreeBSD and DragonFly 1452 ([#672](https://github.com/nix-rust/nix/pull/672)) 1453- Added protocol families in `AddressFamily` enum. 1454 ([#647](https://github.com/nix-rust/nix/pull/647)) 1455- Added the `pid()` method to `WaitStatus` for extracting the PID. 1456 ([#722](https://github.com/nix-rust/nix/pull/722)) 1457- Added `nix::unistd:fexecve`. 1458 ([#727](https://github.com/nix-rust/nix/pull/727)) 1459- Expose `uname()` on all platforms. 1460 ([#739](https://github.com/nix-rust/nix/pull/739)) 1461- Expose `signalfd` module on Android as well. 1462 ([#739](https://github.com/nix-rust/nix/pull/739)) 1463- Added `nix::sys::ptrace::detach`. 1464 ([#749](https://github.com/nix-rust/nix/pull/749)) 1465- Added timestamp socket control message variant: 1466 `nix::sys::socket::ControlMessage::ScmTimestamp` 1467 ([#663](https://github.com/nix-rust/nix/pull/663)) 1468- Added socket option variant that enables the timestamp socket 1469 control message: `nix::sys::socket::sockopt::ReceiveTimestamp` 1470 ([#663](https://github.com/nix-rust/nix/pull/663)) 1471- Added more accessor methods for `AioCb` 1472 ([#773](https://github.com/nix-rust/nix/pull/773)) 1473- Add `nix::sys::fallocate` 1474 ([#768](https:://github.com/nix-rust/nix/pull/768)) 1475- Added `nix::unistd::mkfifo`. 1476 ([#602](https://github.com/nix-rust/nix/pull/774)) 1477- Added `ptrace::Options::PTRACE_O_EXITKILL` on Linux and Android. 1478 ([#771](https://github.com/nix-rust/nix/pull/771)) 1479- Added `nix::sys::uio::{process_vm_readv, process_vm_writev}` on Linux 1480 ([#568](https://github.com/nix-rust/nix/pull/568)) 1481- Added `nix::unistd::{getgroups, setgroups, getgrouplist, initgroups}`. ([#733](https://github.com/nix-rust/nix/pull/733)) 1482- Added `nix::sys::socket::UnixAddr::as_abstract` on Linux and Android. 1483 ([#785](https://github.com/nix-rust/nix/pull/785)) 1484- Added `nix::unistd::execveat` on Linux and Android. 1485 ([#800](https://github.com/nix-rust/nix/pull/800)) 1486- Added the `from_raw()` method to `WaitStatus` for converting raw status values 1487 to `WaitStatus` independent of syscalls. 1488 ([#741](https://github.com/nix-rust/nix/pull/741)) 1489- Added more standard trait implementations for various types. 1490 ([#814](https://github.com/nix-rust/nix/pull/814)) 1491- Added `sigprocmask` to the signal module. 1492 ([#826](https://github.com/nix-rust/nix/pull/826)) 1493- Added `nix::sys::socket::LinkAddr` on Linux and all bsdlike system. 1494 ([#813](https://github.com/nix-rust/nix/pull/813)) 1495- Add socket options for `IP_TRANSPARENT` / `BIND_ANY`. 1496 ([#835](https://github.com/nix-rust/nix/pull/835)) 1497 1498### Changed 1499- Exposed the `mqueue` module for all supported operating systems. 1500 ([#834](https://github.com/nix-rust/nix/pull/834)) 1501- Use native `pipe2` on all BSD targets. Users should notice no difference. 1502 ([#777](https://github.com/nix-rust/nix/pull/777)) 1503- Renamed existing `ptrace` wrappers to encourage namespacing ([#692](https://github.com/nix-rust/nix/pull/692)) 1504- Marked `sys::ptrace::ptrace` as `unsafe`. 1505- Changed function signature of `socket()` and `socketpair()`. The `protocol` argument 1506 has changed type from `c_int` to `SockProtocol`. 1507 It accepts a `None` value for default protocol that was specified with zero using `c_int`. 1508 ([#647](https://github.com/nix-rust/nix/pull/647)) 1509- Made `select` easier to use, adding the ability to automatically calculate the `nfds` parameter using the new 1510 `FdSet::highest` ([#701](https://github.com/nix-rust/nix/pull/701)) 1511- Exposed `unistd::setresuid` and `unistd::setresgid` on FreeBSD and OpenBSD 1512 ([#721](https://github.com/nix-rust/nix/pull/721)) 1513- Refactored the `statvfs` module removing extraneous API functions and the 1514 `statvfs::vfs` module. Additionally `(f)statvfs()` now return the struct 1515 directly. And the returned `Statvfs` struct now exposes its data through 1516 accessor methods. ([#729](https://github.com/nix-rust/nix/pull/729)) 1517- The `addr` argument to `madvise` and `msync` is now `*mut` to better match the 1518 libc API. ([#731](https://github.com/nix-rust/nix/pull/731)) 1519- `shm_open` and `shm_unlink` are no longer exposed on Android targets, where 1520 they are not officially supported. ([#731](https://github.com/nix-rust/nix/pull/731)) 1521- `MapFlags`, `MmapAdvise`, and `MsFlags` expose some more variants and only 1522 officially-supported variants are provided for each target. 1523 ([#731](https://github.com/nix-rust/nix/pull/731)) 1524- Marked `pty::ptsname` function as `unsafe` 1525 ([#744](https://github.com/nix-rust/nix/pull/744)) 1526- Moved constants ptrace request, event and options to enums and updated ptrace functions and argument types accordingly. 1527 ([#749](https://github.com/nix-rust/nix/pull/749)) 1528- `AioCb::Drop` will now panic if the `AioCb` is still in-progress ([#715](https://github.com/nix-rust/nix/pull/715)) 1529- Restricted `nix::sys::socket::UnixAddr::new_abstract` to Linux and Android only. 1530 ([#785](https://github.com/nix-rust/nix/pull/785)) 1531- The `ucred` struct has been removed in favor of a `UserCredentials` struct that 1532 contains only getters for its fields. 1533 ([#814](https://github.com/nix-rust/nix/pull/814)) 1534- Both `ip_mreq` and `ipv6_mreq` have been replaced with `IpMembershipRequest` and 1535 `Ipv6MembershipRequest`. 1536 ([#814](https://github.com/nix-rust/nix/pull/814)) 1537- Removed return type from `pause`. 1538 ([#829](https://github.com/nix-rust/nix/pull/829)) 1539- Changed the termios APIs to allow for using a `u32` instead of the `BaudRate` 1540 enum on BSD platforms to support arbitrary baud rates. See the module docs for 1541 `nix::sys::termios` for more details. 1542 ([#843](https://github.com/nix-rust/nix/pull/843)) 1543 1544### Fixed 1545- Fix compilation and tests for OpenBSD targets 1546 ([#688](https://github.com/nix-rust/nix/pull/688)) 1547- Fixed error handling in `AioCb::fsync`, `AioCb::read`, and `AioCb::write`. 1548 It is no longer an error to drop an `AioCb` that failed to enqueue in the OS. 1549 ([#715](https://github.com/nix-rust/nix/pull/715)) 1550- Fix potential memory corruption on non-Linux platforms when using 1551 `sendmsg`/`recvmsg`, caused by mismatched `msghdr` definition. 1552 ([#648](https://github.com/nix-rust/nix/pull/648)) 1553 1554### Removed 1555- `AioCb::from_boxed_slice` has been removed. It was never actually safe. Use 1556 `from_bytes` or `from_bytes_mut` instead. 1557 ([#820](https://github.com/nix-rust/nix/pull/820)) 1558- The syscall module has been removed. This only exposed enough functionality for 1559 `memfd_create()` and `pivot_root()`, which are still exposed as separate functions. 1560 ([#747](https://github.com/nix-rust/nix/pull/747)) 1561- The `Errno` variants are no longer reexported from the `errno` module. `Errno` itself is no longer reexported from the 1562 crate root and instead must be accessed using the `errno` module. ([#696](https://github.com/nix-rust/nix/pull/696)) 1563- Removed `MS_VERBOSE`, `MS_NOSEC`, and `MS_BORN` from `MsFlags`. These 1564 are internal kernel flags and should never have been exposed. 1565 ([#814](https://github.com/nix-rust/nix/pull/814)) 1566 1567 1568## [0.9.0] 2017-07-23 1569 1570### Added 1571- Added `sysconf`, `pathconf`, and `fpathconf` 1572 ([#630](https://github.com/nix-rust/nix/pull/630) 1573- Added `sys::signal::SigAction::{ flags, mask, handler}` 1574 ([#611](https://github.com/nix-rust/nix/pull/609) 1575- Added `nix::sys::pthread::pthread_self` 1576 ([#591](https://github.com/nix-rust/nix/pull/591) 1577- Added `AioCb::from_boxed_slice` 1578 ([#582](https://github.com/nix-rust/nix/pull/582) 1579- Added `nix::unistd::{openat, fstatat, readlink, readlinkat}` 1580 ([#551](https://github.com/nix-rust/nix/pull/551)) 1581- Added `nix::pty::{grantpt, posix_openpt, ptsname/ptsname_r, unlockpt}` 1582 ([#556](https://github.com/nix-rust/nix/pull/556) 1583- Added `nix::ptr::openpty` 1584 ([#456](https://github.com/nix-rust/nix/pull/456)) 1585- Added `nix::ptrace::{ptrace_get_data, ptrace_getsiginfo, ptrace_setsiginfo 1586 and nix::Error::UnsupportedOperation}` 1587 ([#614](https://github.com/nix-rust/nix/pull/614)) 1588- Added `cfmakeraw`, `cfsetspeed`, and `tcgetsid`. ([#527](https://github.com/nix-rust/nix/pull/527)) 1589- Added "bad none", "bad write_ptr", "bad write_int", and "bad readwrite" variants to the `ioctl!` 1590 macro. ([#670](https://github.com/nix-rust/nix/pull/670)) 1591- On Linux and Android, added support for receiving `PTRACE_O_TRACESYSGOOD` 1592 events from `wait` and `waitpid` using `WaitStatus::PtraceSyscall` 1593 ([#566](https://github.com/nix-rust/nix/pull/566)). 1594 1595### Changed 1596- The `ioctl!` macro and its variants now allow the generated functions to have 1597 doccomments. ([#661](https://github.com/nix-rust/nix/pull/661)) 1598- Changed `ioctl!(write ...)` into `ioctl!(write_ptr ...)` and `ioctl!(write_int ..)` variants 1599 to more clearly separate those use cases. ([#670](https://github.com/nix-rust/nix/pull/670)) 1600- Marked `sys::mman::{ mmap, munmap, madvise, munlock, msync }` as unsafe. 1601 ([#559](https://github.com/nix-rust/nix/pull/559)) 1602- Minimum supported Rust version is now 1.13. 1603- Removed `revents` argument from `PollFd::new()` as it's an output argument and 1604 will be overwritten regardless of value. 1605 ([#542](https://github.com/nix-rust/nix/pull/542)) 1606- Changed type signature of `sys::select::FdSet::contains` to make `self` 1607 immutable ([#564](https://github.com/nix-rust/nix/pull/564)) 1608- Introduced wrapper types for `gid_t`, `pid_t`, and `uid_t` as `Gid`, `Pid`, and `Uid` 1609 respectively. Various functions have been changed to use these new types as 1610 arguments. ([#629](https://github.com/nix-rust/nix/pull/629)) 1611- Fixed compilation on all Android and iOS targets ([#527](https://github.com/nix-rust/nix/pull/527)) 1612 and promoted them to Tier 2 support. 1613- `nix::sys::statfs::{statfs,fstatfs}` uses statfs definition from `libc::statfs` instead of own linux specific type `nix::sys::Statfs`. 1614 Also file system type constants like `nix::sys::statfs::ADFS_SUPER_MAGIC` were removed in favor of the libc equivalent. 1615 ([#561](https://github.com/nix-rust/nix/pull/561)) 1616- Revised the termios API including additional tests and documentation and exposed it on iOS. ([#527](https://github.com/nix-rust/nix/pull/527)) 1617- `eventfd`, `signalfd`, and `pwritev`/`preadv` functionality is now included by default for all 1618 supported platforms. ([#681](https://github.com/nix-rust/nix/pull/561)) 1619- The `ioctl!` macro's plain variants has been replaced with "bad read" to be consistent with 1620 other variants. The generated functions also have more strict types for their arguments. The 1621 "*_buf" variants also now calculate total array size and take slice references for improved type 1622 safety. The documentation has also been dramatically improved. 1623 ([#670](https://github.com/nix-rust/nix/pull/670)) 1624 1625### Removed 1626- Removed `io::Error` from `nix::Error` and the conversion from `nix::Error` to `Errno` 1627 ([#614](https://github.com/nix-rust/nix/pull/614)) 1628- All feature flags have been removed in favor of conditional compilation on supported platforms. 1629 `execvpe` is no longer supported, but this was already broken and will be added back in the next 1630 release. ([#681](https://github.com/nix-rust/nix/pull/561)) 1631- Removed `ioc_*` functions and many helper constants and macros within the `ioctl` module. These 1632 should always have been private and only the `ioctl!` should be used in public code. 1633 ([#670](https://github.com/nix-rust/nix/pull/670)) 1634 1635### Fixed 1636- Fixed multiple issues compiling under different archetectures and OSes. 1637 Now compiles on Linux/MIPS ([#538](https://github.com/nix-rust/nix/pull/538)), 1638 `Linux/PPC` ([#553](https://github.com/nix-rust/nix/pull/553)), 1639 `MacOS/x86_64,i686` ([#553](https://github.com/nix-rust/nix/pull/553)), 1640 `NetBSD/x64_64` ([#538](https://github.com/nix-rust/nix/pull/538)), 1641 `FreeBSD/x86_64,i686` ([#536](https://github.com/nix-rust/nix/pull/536)), and 1642 `Android` ([#631](https://github.com/nix-rust/nix/pull/631)). 1643- `bind` and `errno_location` now work correctly on `Android` 1644 ([#631](https://github.com/nix-rust/nix/pull/631)) 1645- Added `nix::ptrace` on all Linux-kernel-based platforms 1646 [#624](https://github.com/nix-rust/nix/pull/624). Previously it was 1647 only available on x86, x86-64, and ARM, and also not on Android. 1648- Fixed `sys::socket::sendmsg` with zero entry `cmsgs` parameter. 1649 ([#623](https://github.com/nix-rust/nix/pull/623)) 1650- Multiple constants related to the termios API have now been properly defined for 1651 all supported platforms. ([#527](https://github.com/nix-rust/nix/pull/527)) 1652- `ioctl!` macro now supports working with non-int datatypes and properly supports all platforms. 1653 ([#670](https://github.com/nix-rust/nix/pull/670)) 1654 1655## [0.8.1] 2017-04-16 1656 1657### Fixed 1658- Fixed build on FreeBSD. (Cherry-picked 1659 [a859ee3c](https://github.com/nix-rust/nix/commit/a859ee3c9396dfdb118fcc2c8ecc697e2d303467)) 1660 1661## [0.8.0] 2017-03-02 1662 1663### Added 1664- Added `::nix::sys::termios::BaudRate` enum to provide portable baudrate 1665 values. ([#518](https://github.com/nix-rust/nix/pull/518)) 1666- Added a new `WaitStatus::PtraceEvent` to support ptrace events on Linux 1667 and Android ([#438](https://github.com/nix-rust/nix/pull/438)) 1668- Added support for POSIX AIO 1669 ([#483](https://github.com/nix-rust/nix/pull/483)) 1670 ([#506](https://github.com/nix-rust/nix/pull/506)) 1671- Added support for XNU system control sockets 1672 ([#478](https://github.com/nix-rust/nix/pull/478)) 1673- Added support for `ioctl` calls on BSD platforms 1674 ([#478](https://github.com/nix-rust/nix/pull/478)) 1675- Added struct `TimeSpec` 1676 ([#475](https://github.com/nix-rust/nix/pull/475)) 1677 ([#483](https://github.com/nix-rust/nix/pull/483)) 1678- Added complete definitions for all kqueue-related constants on all supported 1679 OSes 1680 ([#415](https://github.com/nix-rust/nix/pull/415)) 1681- Added function `epoll_create1` and bitflags `EpollCreateFlags` in 1682 `::nix::sys::epoll` in order to support `::libc::epoll_create1`. 1683 ([#410](https://github.com/nix-rust/nix/pull/410)) 1684- Added `setresuid` and `setresgid` for Linux in `::nix::unistd` 1685 ([#448](https://github.com/nix-rust/nix/pull/448)) 1686- Added `getpgid` in `::nix::unistd` 1687 ([#433](https://github.com/nix-rust/nix/pull/433)) 1688- Added `tcgetpgrp` and `tcsetpgrp` in `::nix::unistd` 1689 ([#451](https://github.com/nix-rust/nix/pull/451)) 1690- Added `CLONE_NEWCGROUP` in `::nix::sched` 1691 ([#457](https://github.com/nix-rust/nix/pull/457)) 1692- Added `getpgrp` in `::nix::unistd` 1693 ([#491](https://github.com/nix-rust/nix/pull/491)) 1694- Added `fchdir` in `::nix::unistd` 1695 ([#497](https://github.com/nix-rust/nix/pull/497)) 1696- Added `major` and `minor` in `::nix::sys::stat` for decomposing `dev_t` 1697 ([#508](https://github.com/nix-rust/nix/pull/508)) 1698- Fixed the style of many bitflags and use `libc` in more places. 1699 ([#503](https://github.com/nix-rust/nix/pull/503)) 1700- Added `ppoll` in `::nix::poll` 1701 ([#520](https://github.com/nix-rust/nix/pull/520)) 1702- Added support for getting and setting pipe size with fcntl(2) on Linux 1703 ([#540](https://github.com/nix-rust/nix/pull/540)) 1704 1705### Changed 1706- `::nix::sys::termios::{cfgetispeed, cfsetispeed, cfgetospeed, cfsetospeed}` 1707 switched to use `BaudRate` enum from `speed_t`. 1708 ([#518](https://github.com/nix-rust/nix/pull/518)) 1709- `epoll_ctl` now could accept None as argument `event` 1710 when op is `EpollOp::EpollCtlDel`. 1711 ([#480](https://github.com/nix-rust/nix/pull/480)) 1712- Removed the `bad` keyword from the `ioctl!` macro 1713 ([#478](https://github.com/nix-rust/nix/pull/478)) 1714- Changed `TimeVal` into an opaque Newtype 1715 ([#475](https://github.com/nix-rust/nix/pull/475)) 1716- `kill`'s signature, defined in `::nix::sys::signal`, changed, so that the 1717 signal parameter has type `T: Into<Option<Signal>>`. `None` as an argument 1718 for that parameter will result in a 0 passed to libc's `kill`, while a 1719 `Some`-argument will result in the previous behavior for the contained 1720 `Signal`. 1721 ([#445](https://github.com/nix-rust/nix/pull/445)) 1722- The minimum supported version of rustc is now 1.7.0. 1723 ([#444](https://github.com/nix-rust/nix/pull/444)) 1724- Changed `KEvent` to an opaque structure that may only be modified by its 1725 constructor and the `ev_set` method. 1726 ([#415](https://github.com/nix-rust/nix/pull/415)) 1727 ([#442](https://github.com/nix-rust/nix/pull/442)) 1728 ([#463](https://github.com/nix-rust/nix/pull/463)) 1729- `pipe2` now calls `libc::pipe2` where available. Previously it was emulated 1730 using `pipe`, which meant that setting `O_CLOEXEC` was not atomic. 1731 ([#427](https://github.com/nix-rust/nix/pull/427)) 1732- Renamed `EpollEventKind` to `EpollFlags` in `::nix::sys::epoll` in order for 1733 it to conform with our conventions. 1734 ([#410](https://github.com/nix-rust/nix/pull/410)) 1735- `EpollEvent` in `::nix::sys::epoll` is now an opaque proxy for 1736 `::libc::epoll_event`. The formerly public field `events` is now be read-only 1737 accessible with the new method `events()` of `EpollEvent`. Instances of 1738 `EpollEvent` can be constructed using the new method `new()` of EpollEvent. 1739 ([#410](https://github.com/nix-rust/nix/pull/410)) 1740- `SigFlags` in `::nix::sys::signal` has be renamed to `SigmaskHow` and its type 1741 has changed from `bitflags` to `enum` in order to conform to our conventions. 1742 ([#460](https://github.com/nix-rust/nix/pull/460)) 1743- `sethostname` now takes a `&str` instead of a `&[u8]` as this provides an API 1744 that makes more sense in normal, correct usage of the API. 1745- `gethostname` previously did not expose the actual length of the hostname 1746 written from the underlying system call at all. This has been updated to 1747 return a `&CStr` within the provided buffer that is always properly 1748 NUL-terminated (this is not guaranteed by the call with all platforms/libc 1749 implementations). 1750- Exposed all fcntl(2) operations at the module level, so they can be 1751 imported direclty instead of via `FcntlArg` enum. 1752 ([#541](https://github.com/nix-rust/nix/pull/541)) 1753 1754### Fixed 1755- Fixed multiple issues with Unix domain sockets on non-Linux OSes 1756 ([#474](https://github.com/nix-rust/nix/pull/415)) 1757- Fixed using kqueue with `EVFILT_USER` on FreeBSD 1758 ([#415](https://github.com/nix-rust/nix/pull/415)) 1759- Fixed the build on FreeBSD, and fixed the getsockopt, sendmsg, and recvmsg 1760 functions on that same OS. 1761 ([#397](https://github.com/nix-rust/nix/pull/397)) 1762- Fixed an off-by-one bug in `UnixAddr::new_abstract` in `::nix::sys::socket`. 1763 ([#429](https://github.com/nix-rust/nix/pull/429)) 1764- Fixed clone passing a potentially unaligned stack. 1765 ([#490](https://github.com/nix-rust/nix/pull/490)) 1766- Fixed mkdev not creating a `dev_t` the same way as libc. 1767 ([#508](https://github.com/nix-rust/nix/pull/508)) 1768 1769## [0.7.0] 2016-09-09 1770 1771### Added 1772- Added `lseek` and `lseek64` in `::nix::unistd` 1773 ([#377](https://github.com/nix-rust/nix/pull/377)) 1774- Added `mkdir` and `getcwd` in `::nix::unistd` 1775 ([#416](https://github.com/nix-rust/nix/pull/416)) 1776- Added accessors `sigmask_mut` and `sigmask` to `UContext` in 1777 `::nix::ucontext`. 1778 ([#370](https://github.com/nix-rust/nix/pull/370)) 1779- Added `WUNTRACED` to `WaitPidFlag` in `::nix::sys::wait` for non-_linux_ 1780 targets. 1781 ([#379](https://github.com/nix-rust/nix/pull/379)) 1782- Added new module `::nix::sys::reboot` with enumeration `RebootMode` and 1783 functions `reboot` and `set_cad_enabled`. Currently for _linux_ only. 1784 ([#386](https://github.com/nix-rust/nix/pull/386)) 1785- `FdSet` in `::nix::sys::select` now also implements `Clone`. 1786 ([#405](https://github.com/nix-rust/nix/pull/405)) 1787- Added `F_FULLFSYNC` to `FcntlArg` in `::nix::fcntl` for _apple_ targets. 1788 ([#407](https://github.com/nix-rust/nix/pull/407)) 1789- Added `CpuSet::unset` in `::nix::sched`. 1790 ([#402](https://github.com/nix-rust/nix/pull/402)) 1791- Added constructor method `new()` to `PollFd` in `::nix::poll`, in order to 1792 allow creation of objects, after removing public access to members. 1793 ([#399](https://github.com/nix-rust/nix/pull/399)) 1794- Added method `revents()` to `PollFd` in `::nix::poll`, in order to provide 1795 read access to formerly public member `revents`. 1796 ([#399](https://github.com/nix-rust/nix/pull/399)) 1797- Added `MSG_CMSG_CLOEXEC` to `MsgFlags` in `::nix::sys::socket` for _linux_ only. 1798 ([#422](https://github.com/nix-rust/nix/pull/422)) 1799 1800### Changed 1801- Replaced the reexported integer constants for signals by the enumeration 1802 `Signal` in `::nix::sys::signal`. 1803 ([#362](https://github.com/nix-rust/nix/pull/362)) 1804- Renamed `EventFdFlag` to `EfdFlags` in `::nix::sys::eventfd`. 1805 ([#383](https://github.com/nix-rust/nix/pull/383)) 1806- Changed the result types of `CpuSet::is_set` and `CpuSet::set` in 1807 `::nix::sched` to `Result<bool>` and `Result<()>`, respectively. They now 1808 return `EINVAL`, if an invalid argument for the `field` parameter is passed. 1809 ([#402](https://github.com/nix-rust/nix/pull/402)) 1810- `MqAttr` in `::nix::mqueue` is now an opaque proxy for `::libc::mq_attr`, 1811 which has the same structure as the old `MqAttr`. The field `mq_flags` of 1812 `::libc::mq_attr` is readable using the new method `flags()` of `MqAttr`. 1813 `MqAttr` also no longer implements `Debug`. 1814 ([#392](https://github.com/nix-rust/nix/pull/392)) 1815- The parameter `msq_prio` of `mq_receive` with type `u32` in `::nix::mqueue` 1816 was replaced by a parameter named `msg_prio` with type `&mut u32`, so that 1817 the message priority can be obtained by the caller. 1818 ([#392](https://github.com/nix-rust/nix/pull/392)) 1819- The type alias `MQd` in `::nix::queue` was replaced by the type alias 1820 `libc::mqd_t`, both of which are aliases for the same type. 1821 ([#392](https://github.com/nix-rust/nix/pull/392)) 1822 1823### Removed 1824- Type alias `SigNum` from `::nix::sys::signal`. 1825 ([#362](https://github.com/nix-rust/nix/pull/362)) 1826- Type alias `CpuMask` from `::nix::shed`. 1827 ([#402](https://github.com/nix-rust/nix/pull/402)) 1828- Removed public fields from `PollFd` in `::nix::poll`. (See also added method 1829 `revents()`. 1830 ([#399](https://github.com/nix-rust/nix/pull/399)) 1831 1832### Fixed 1833- Fixed the build problem for NetBSD (Note, that we currently do not support 1834 it, so it might already be broken again). 1835 ([#389](https://github.com/nix-rust/nix/pull/389)) 1836- Fixed the build on FreeBSD, and fixed the getsockopt, sendmsg, and recvmsg 1837 functions on that same OS. 1838 ([#397](https://github.com/nix-rust/nix/pull/397)) 1839 1840## [0.6.0] 2016-06-10 1841 1842### Added 1843- Added `gettid` in `::nix::unistd` for _linux_ and _android_. 1844 ([#293](https://github.com/nix-rust/nix/pull/293)) 1845- Some _mips_ support in `::nix::sched` and `::nix::sys::syscall`. 1846 ([#301](https://github.com/nix-rust/nix/pull/301)) 1847- Added `SIGNALFD_SIGINFO_SIZE` in `::nix::sys::signalfd`. 1848 ([#309](https://github.com/nix-rust/nix/pull/309)) 1849- Added new module `::nix::ucontext` with struct `UContext`. Currently for 1850 _linux_ only. 1851 ([#311](https://github.com/nix-rust/nix/pull/311)) 1852- Added `EPOLLEXCLUSIVE` to `EpollEventKind` in `::nix::sys::epoll`. 1853 ([#330](https://github.com/nix-rust/nix/pull/330)) 1854- Added `pause` to `::nix::unistd`. 1855 ([#336](https://github.com/nix-rust/nix/pull/336)) 1856- Added `sleep` to `::nix::unistd`. 1857 ([#351](https://github.com/nix-rust/nix/pull/351)) 1858- Added `S_IFDIR`, `S_IFLNK`, `S_IFMT` to `SFlag` in `::nix::sys::stat`. 1859 ([#359](https://github.com/nix-rust/nix/pull/359)) 1860- Added `clear` and `extend` functions to `SigSet`'s implementation in 1861 `::nix::sys::signal`. 1862 ([#347](https://github.com/nix-rust/nix/pull/347)) 1863- `sockaddr_storage_to_addr` in `::nix::sys::socket` now supports `sockaddr_nl` 1864 on _linux_ and _android_. 1865 ([#366](https://github.com/nix-rust/nix/pull/366)) 1866- Added support for `SO_ORIGINAL_DST` in `::nix::sys::socket` on _linux_. 1867 ([#367](https://github.com/nix-rust/nix/pull/367)) 1868- Added `SIGINFO` in `::nix::sys::signal` for the _macos_ target as well as 1869 `SIGPWR` and `SIGSTKFLT` in `::nix::sys::signal` for non-_macos_ targets. 1870 ([#361](https://github.com/nix-rust/nix/pull/361)) 1871 1872### Changed 1873- Changed the structure `IoVec` in `::nix::sys::uio`. 1874 ([#304](https://github.com/nix-rust/nix/pull/304)) 1875- Replaced `CREATE_NEW_FD` by `SIGNALFD_NEW` in `::nix::sys::signalfd`. 1876 ([#309](https://github.com/nix-rust/nix/pull/309)) 1877- Renamed `SaFlag` to `SaFlags` and `SigFlag` to `SigFlags` in 1878 `::nix::sys::signal`. 1879 ([#314](https://github.com/nix-rust/nix/pull/314)) 1880- Renamed `Fork` to `ForkResult` and changed its fields in `::nix::unistd`. 1881 ([#332](https://github.com/nix-rust/nix/pull/332)) 1882- Added the `signal` parameter to `clone`'s signature in `::nix::sched`. 1883 ([#344](https://github.com/nix-rust/nix/pull/344)) 1884- `execv`, `execve`, and `execvp` now return `Result<Void>` instead of 1885 `Result<()>` in `::nix::unistd`. 1886 ([#357](https://github.com/nix-rust/nix/pull/357)) 1887 1888### Fixed 1889- Improved the conversion from `std::net::SocketAddr` to `InetAddr` in 1890 `::nix::sys::socket::addr`. 1891 ([#335](https://github.com/nix-rust/nix/pull/335)) 1892 1893## [0.5.0] 2016-03-01 1894