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