chore(deps): update rust crate nix to 0.31.0 #1430

Merged
ginger merged 1 commit from renovate/nix-0.x into main 2026-02-21 17:39:01 +00:00
Collaborator

This PR contains the following updates:

Package Type Update Change
nix workspace.dependencies minor 0.30.10.31.0

Release Notes

nix-rust/nix (nix)

v0.31.1

Compare Source

Added
  • termios: Add definition for IUCLC to supported platforms
    (#​2702)
  • termios: Add definition for XCASE for supported platforms
    (#​2703)

v0.31.0

Compare Source

Added
  • Added the UDP GSO/GRO socket options and CMsgs on Android. This includes the
    following types:

    • UdpGsoSegment
    • UdpGroSegment
    • ControlMessage::UdpGsoSegments
    • ControlMessageOwned::UdpGroSegments

    (#​2666)

  • Define errno EWOULDBLOCK as an alias of EAGAIN to match the AIX libc
    definition. (#​2692)

  • Enable module ifaddrs on GNU Hurd
    (#​2697)

  • Add termios OutputFlags::OFILL for Linux, Android, Aix, Cygwin, Fuchsia,
    Haiku,
    GNU/Hurd, Nto, Redox, Illumos, Solaris and Apple OSes.
    (#​2701)

  • add sync() for cygwin (#​2708)

Changed
Fixed
  • Fixed nix::sys::ptrace::syscall_info, which was not setting the data
    argument properly, causing garbage values to be returned.
    (#​2653)
  • Cast the 'addr' argument of 'madvise()' to '*mut u8' on AIX to match the
    signature in the AIX libc.
    (#​2655)
  • Fixed the Dir module on NTO, Solaris, Hurd, and possibly other platforms.
    The
    d_name field was not copied correctly on those platforms. For some other
    platforms, it could be copied incorrectly for files with very long pathnames.
    (#​2674)
  • Fix the build on Illumos (#​2694)
Removed
  • Removed Eq and PartialEq implementations from SigHandler, because they
    never worked reliably. The suggested alternative is matches!. For
    example:
    let h: SigHandler = ...
    if matches!(h, SigHandler::SigIgn) {
        ...
    }
    ``` ([#​2642](https://github.com/nix-rust/nix/pull/2642))
    
  • Removed IFF_NOTRAILERS by NetBSD, as it has been removed upstream and from
    libc (#​2724)

[0.30.1] - 2025-05-04

Fixed

[0.30.0] - 2025-04-29

Added
  • Add socket option IPV6_PKTINFO for BSDs/Linux/Android, also
    IPV6_RECVPKTINFO for DragonFlyBSD
    (#​2113)
  • Add fcntl's F_PREALLOCATE constant for Apple targets.
    (#​2393)
  • Improve support for extracting the TTL / Hop Limit from incoming packets
    and support for DSCP (ToS / Traffic Class).
    (#​2425)
  • Add socket option IP_TOS (nix::sys::socket::sockopt::IpTos) IPV6_TCLASS
    (nix::sys::socket::sockopt::Ipv6TClass) on Android/FreeBSD
    (#​2464)
  • Add SeekData and SeekHole to Whence for hurd and apple targets
    (#​2473)
  • Add From trait implementation between SocketAddr and Sockaddr,
    Sockaddr6 (#​2474)
  • Added wrappers for posix_spawn API
    (#​2475)
  • Add the support for Emscripten.
    (#​2477)
  • Add fcntl constant F_RDADVISE for Apple target
    (#​2480)
  • Add fcntl constant F_RDAHEAD for Apple target
    (#​2482)
  • Add F_LOG2PHYS and F_LOG2PHYS_EXT for Apple target
    (#​2483)
  • MAP_SHARED_VALIDATE was added for all linux targets. & MAP_SYNC was added
    for linux with the exclusion of mips architecures, and uclibc
    (#​2499)
  • Add getregs()/getregset()/setregset() for Linux/musl/aarch64
    (#​2502)
  • Add FcntlArgs F_TRANSFEREXTENTS constant for Apple targets
    (#​2504)
  • Add MapFlags::MAP_STACK in sys::man for netbsd
    (#​2526)
  • Add support for libc::LOCAL_PEERTOKEN in getsockopt.
    (#​2529)
  • Add support for syslog, openlog, closelog on all unix.
    (#​2537)
  • Add the TCP_FUNCTION_BLK sockopt, on FreeBSD.
    (#​2539)
  • Implements Into<OwnedFd> for PtyMaster/Fanotify/Inotify/SignalFd/TimerFd
    (#​2548)
  • Add MremapFlags::MREMAP_DONTUNMAP to sys::mman::mremap for linux target.
    (#​2555)
  • Added sockopt_impl! to the public API. It's now possible for users to
    define
    their own sockopts without needing to make a PR to Nix.
    (#​2556)
  • Add the TCP_FUNCTION_ALIAS sockopt, on FreeBSD.
    (#​2558)
  • Add sys::mman::MmapAdvise MADV_PAGEOUT, MADV_COLD, MADV_WIPEONFORK,
    MADV_KEEPONFORK for Linux and Android targets
    (#​2559)
  • Add socket protocol Sctp, as well as MSG_NOTIFICATION for non-Android
    Linux targets. (#​2562)
  • Added from_owned_fd constructor to EventFd
    (#​2563)
  • Add sys::mman::MmapAdvise MADV_POPULATE_READ, MADV_POPULATE_WRITE for
    Linux and Android targets
    (#​2565)
  • Added from_owned_fd constructor to
    PtyMaster/Fanotify/Inotify/SignalFd/TimerFd
    (#​2566)
  • Added FcntlArg::F_READAHEAD for FreeBSD target
    (#​2569)
  • Added sockopt::LingerSec for Apple targets
    (#​2572)
  • Added sockopt::EsclBind for solarish targets
    (#​2573)
  • Exposed the std::os::fd::AsRawFd trait method for
    nix::sys::fanotify::Fanotify struct
    (#​2575)
  • Add support for syslog's setlogmask on all unix.
    (#​2579)
  • Added Fuchsia support for ioctl.
    (#​2580)
  • Add sys::socket::SockProtocol::EthIp,
    sys::socket::SockProtocol::EthIpv6,
    sys::socket::SockProtocol::EthLoop
    (#​2581)
  • Add OpenHarmony target into CI and Update documents.
    (#​2599)
  • Added the TcpMaxSeg setsockopt option for apple targets
    (#​2603)
  • Add FilAttach and FilDetach to socket::sockopt for Illumos
    (#​2611)
  • Add PeerPidfd (SO_PEERPIDFD) to socket::sockopt for Linux
    (#​2620)
  • Added socket::sockopt::AttachReusePortCbpf for Linux
    (#​2621)
  • Add ptrace::syscall_info for linux/glibc
    (#​2627)
Changed
  • Module sys/signal now adopts I/O safety
    (#​1936)
  • Change the type of the name argument of memfd_create() from &CStr to
    <P: NixPath>(name: &P) (#​2431)
  • Public interfaces in fcntl.rs and dir.rs now use I/O-safe types.
    (#​2434)
  • Module sys/stat now adopts I/O safety.
    (#​2439)
  • Module unistd now adopts I/O safety.
    (#​2440)
  • Module sys/fanotify now adopts I/O safety
    (#​2443)
  • Socket option IpTos has been renamed to Ipv4Tos, the old symbol is
    deprecated since 0.30.0 (#​2465)
  • Rename Flags EventFlag to EvFlags, and MemFdCreateFlag to MFdFlags
    (#​2476)
  • Made nix::sys::socket::UnknownCmsg public and more readable
    (#​2520)
  • recvmsg: take slice for cmsg_buffer instead of Vec
    (#​2524)
  • linkat: allow distinct types for path arguments
    (#​2582)
Fixed
  • Disable unsupported signals on sparc-linux
    (#​2454)
  • Fix cmsg_len() return type on OpenHarmony
    (#​2456)
  • The ns argument of sys::prctl::set_timerslack() should be of type
    c_ulong (#​2505)
  • Properly exclude NUL characters from OSStrings returned by getsockopt.
    (#​2557)
  • Fixes the build on OpenHarmony
    (#​2587)
Removed
  • Type SigevNotify is no longer PartialEq, Eq and Hash due to the use
    of BorrowedFd (#​1936)
  • EventFd::defuse() is removed because it does nothing, EventFd::arm() is
    also removed for symmetry reasons.
    (#​2452)
  • Removed the Copy trait from PollFd
    (#​2631)

[0.29.0] - 2024-05-24

Added
  • Add getregset()/setregset() for Linux/glibc/x86/x86_64/aarch64/riscv64 and
    getregs()/setregs() for Linux/glibc/aarch64/riscv64
    (#​2044)
  • Add socket option Ipv6Ttl for apple targets.
    (#​2287)
  • Add socket option UtunIfname.
    (#​2325)
  • make SigAction repr(transparent) & can be converted to the libc raw type
    (#​2326)
  • Add From trait implementation for conversions between sockaddr_in and
    SockaddrIn, sockaddr_in6 and SockaddrIn6
    (#​2328)
  • Add socket option ReusePortLb for FreeBSD.
    (#​2332)
  • Added support for openat2 on linux.
    (#​2339)
  • Add if_indextoname function.
    (#​2340)
  • Add mount and unmount API for apple targets.
    (#​2347)
  • Added _PC_MIN_HOLE_SIZE for pathconf and fpathconf.
    (#​2349)
  • Added impl AsFd for pty::PtyMaster
    (#​2355)
  • Add open flag O_SEARCH to AIX, Empscripten, FreeBSD, Fuchsia, solarish,
    WASI (#​2374)
  • Add prctl function prctl_set_vma_anon_name for Linux/Android.
    (#​2378)
  • Add sync(2) for apple_targets/solarish/haiku/aix/hurd, syncfs(2) for
    hurd and fdatasync(2) for aix/hurd
    (#​2379)
  • Add fdatasync support for Apple targets.
    (#​2380)
  • Add fcntl::OFlag::O_PATH for FreeBSD and Fuchsia
    (#​2382)
  • Added PathconfVar::MIN_HOLE_SIZE for apple_targets.
    (#​2388)
  • Add open flag O_SEARCH to apple_targets
    (#​2391)
  • O_DSYNC may now be used with aio_fsync and fcntl on FreeBSD.
    (#​2404)
  • Added Flock::relock for upgrading and downgrading locks.
    (#​2407)
Changed
  • Change the ForkptyResult type to the following repr so that the
    uninitialized
    master field won't be accessed in the child process:

    pub enum ForkptyResult {
        Parent {
            child: Pid,
            master: OwnedFd,
        },
        Child,
    }
    ``` ([#&#8203;2315](https://github.com/nix-rust/nix/pull/2315))
    
  • Updated cfg_aliases dependency from version 0.1 to 0.2
    (#​2322)

  • Change the signature of ptrace::write and ptrace::write_user to make them
    safe (#​2324)

  • Allow use of SignalFd through shared reference

    Like with many other file descriptors, concurrent use of signalfds is safe.
    Changing the signal mask of and reading signals from a signalfd can now be
    done
    with the SignalFd API even if other references to it exist.
    (#​2367)

  • Changed tee, splice and vmsplice RawFd arguments to AsFd.
    (#​2387)

  • Added I/O safety to the sys/aio module. Most functions that previously
    accepted a AsRawFd argument now accept an AsFd instead.
    (#​2401)

  • RecvMsg::cmsgs() now returns a Result, and checks that cmsgs were not
    truncated. (#​2413)

Fixed
  • No longer panics when the fanotify queue overflows.
    (#​2399)
  • Fixed ControlMessageOwned::UdpGroSegments wrapped type from u16 to i32 to
    reflect the used kernel's one.
    (#​2406)

[0.28.0] - 2024-02-24

Added
  • Added mkdtemp wrapper (#​1297)

  • Add associated constants UTIME_OMIT UTIME_NOW for TimeSpec
    (#​1879)

  • Added EventFd type. (#​1945)

    • Added impl From<Signal> for SigSet.
    • Added impl std::ops::BitOr for SigSet.
    • Added impl std::ops::BitOr for Signal.
    • Added impl std::ops::BitOr<Signal> for SigSet

    (#​1959)

  • Added TlsGetRecordType control message type and corresponding enum for
    linux (#​2065)

  • Added Ipv6HopLimit to ::nix::sys::socket::ControlMessage for Linux,
    MacOS, FreeBSD, DragonflyBSD, Android, iOS and Haiku.
    (#​2074)

  • Added Icmp and IcmpV6 to SockProtocol
    (#​2103)

  • Added rfork support for FreeBSD in unistd
    (#​2121)

  • Added MapFlags::map_hugetlb_with_size_log2 method for Linux targets
    (#​2125)

  • Added mmap_anonymous function
    (#​2127)

  • Added mips32r6 and mips64r6 support for signal, ioctl and ptrace
    (#​2138)

  • Added F_GETPATH FcntlFlags entry on Apple/NetBSD/DragonflyBSD for
    ::nix::fcntl. (#​2142)

  • Added F_KINFO FcntlFlags entry on FreeBSD for ::nix::fcntl.
    (#​2152)

  • Added F_GETPATH_NOFIRMLINK and F_BARRIERFSYNC FcntlFlags entry
    on Apple for ::nix::fcntl.
    (#​2155)

  • Added newtype Flock to automatically unlock a held flock upon drop.
    Added Flockable trait to represent valid types for Flock.
    (#​2170)

  • Added SetSockOpt impls to enable Linux Kernel TLS on a TCP socket and to
    import TLS parameters. (#​2175)

    • Added the ::nix::sys::socket::SocketTimestamp enum for configuring the
      TsClock (a.k.a SO_TS_CLOCK) sockopt
    • Added FreeBSD's ScmRealtime and ScmMonotonic as new options in
      ::nix::sys::socket::ControlMessageOwned

    (#​2187)

  • Added new fanotify API: wrappers for fanotify_init and fanotify_mark
    (#​2194)

  • Added SpecialCharacterindices support for haiku.
    (#​2195)

  • Added sys::sendfile support for solaris/illumos.
    (#​2198)

  • impl Display for InterfaceFlags
    (#​2206)

  • Added sendfilev in sys::sendfile for solarish
    (#​2207)

  • Added fctrl::SealFlag::F_SEAL_FUTURE_WRITE
    (#​2213)

  • Added Ipv6MulticastHops as socket option to set and read.
    (#​2234)

  • Enable ControlMessageOwned::Ipv4RecvIf and
    ControlMessageOwned::Ipv4RecvDstAddr for DragonFlyBSD
    (#​2240)

  • ClockId::set_time() and time::clock_settime() are now enabled on macOS
    (#​2241)

  • Added IpBindAddressNoPort sockopt to support IP_BIND_ADDRESS_NO_PORT
    available on linux. (#​2244)

  • Enable MapFlags::map_hugetlb_with_size_log2 method for Android/Fuchsia
    (#​2245)

  • Added TcpFastOpenConnect sockopt to support TCP_FASTOPEN_CONNECT
    available on linux. (#​2247)

  • Add reboot(2) for OpenBSD/NetBSD
    (#​2251)

  • Added new MemFdCreateFlag constants to sys::memfd on Linux and Android
    related to hugetlbfs support.
    (#​2252)

  • Expose the inner fd of Kqueue through:

    • impl AsFd for Kqueue
    • impl From<Kqueue> for OwnedFd

    (#​2258)

  • Added sys::eventfd support on FreeBSD
    (#​2259)

  • Added MmapFlags::MAP_FIXED constant in sys::mman for netbsd and openbsd
    (#​2260)

  • Added the SO_LISTENQLIMIT sockopt.
    (#​2263)

  • Enable the AT_EMPTY_PATH flag for the fchownat() function
    (#​2267)

  • Add AtFlags::AT_EMPTY_PATH for FreeBSD and Hurd
    (#​2270)

  • Enable `OFlag::O_DIRECTORY for Solarish
    (#​2275)

  • Added the Backlog wrapper type for the listen call.
    (#​2276)

  • Add clock_nanosleep() (#​2277)

  • Enabled O_DIRECT in fcntl::OFlags for solarish
    (#​2278)

  • Added a new API sigsuspend.
    (#​2279)

    • Added errno::Errno::set function
    • Added errno::Errno::set_raw function
    • Added errno::Errno::last_raw function
    • Added errno::Errno::from_raw function

    (#​2283)

  • Enable the AT_EMPTY_PATH flag for the linkat() function
    (#​2284)

  • Enable unistd::{sync, syncfs} for Android
    (#​2296)

Changed
  • poll now takes PollTimeout replacing libc::c_int.
    (#​1876)

  • Deprecated sys::eventfd::eventfd.
    (#​1945)

  • mmap, mmap_anonymous, munmap, mremap, madvise, msync, mprotect,
    munlock and mlock updated to use NonNull.
    (#​2000)

  • mmap function now accepts F instead of Option<F>
    (#​2127)

  • PollFd::new now takes a BorrowedFd argument, with relaxed lifetime
    requirements relative to the previous version.
    (#​2134)

  • FdSet::{insert, remove, contains} now take BorrowedFd arguments, and have
    relaxed lifetime requirements relative to 0.27.1.
    (#​2136)

  • The following APIs now take an implementation of AsFd rather than a
    RawFd:

    • unistd::tcgetpgrp
    • unistd::tcsetpgrp
    • unistd::fpathconf
    • unistd::ttyname
    • unistd::getpeereid (#​2137)
  • Changed openat() and Dir::openat(), now take optional dirfds
    (#​2139)

  • The MSRV is now 1.69 (#​2144)

  • Changed function SockaddrIn::ip() to return net::Ipv4Addr and refactored
    SocketAddrV6::ip() to be const
    (#​2151)

  • The following APIs now take optional dirfds:

    • readlinkat()
    • fstatat()
    • mknodat()
    • mkdirat()
    • execveat()

    (#​2157)

  • Epoll::wait now takes EpollTimeout replacing isize.
    (#​2202)

    • Deprecated errno::errno() function (use Errno::last_raw())
    • Deprecated errno::from_i32() function (use Errno::from_raw())
    • Deprecated errno::Errno::from_i32() function (use Errno::from_raw())

    (#​2283)

Fixed
  • Fix SigSet incorrect implementation of Eq, PartialEq and Hash
    (#​1946)
  • Fixed ::sys::socket::sockopt::IpMulticastTtl by fixing the value of optlen
    passed to libc::setsockopt and added tests.
    (#​2072)
  • Fixed the function signature of recvmmsg, potentially causing UB
    (#​2119)
  • Fix SignalFd::set_mask. In 0.27.0 it would actually close the file
    descriptor. (#​2141)
  • Fixed UnixAddr::new for haiku, it did not record the sun_len value as
    needed.
    Fixed sys::socket::addr::from_raw_parts and
    sys::socket::Sockaddrlike::len build for solaris.
    (#​2242)
  • Fixed solaris build globally.
    (#​2248)
  • Changed the dup3 wrapper to perform a real call to dup3 instead of
    emulating it via dup2 and fcntl to get rid of race condition
    (#​2268)
  • Fixed ::unistd::Group::members using read_unaligned to avoid crash on
    misaligned pointers (#​2311)
Removed
  • The FchownatFlags type has been deprecated, please use AtFlags instead.
    (#​2267)
  • Removed the dup3 wrapper on macOS, which was emulated via dup2 and
    fcntl and could cause a race condition. The dup3 system call is not
    supported on macOS. (#​2268)
  • The LinkatFlags type has been deprecated, please use AtFlags instead.
    (#​2284)

[0.27.1] - 2023-08-28

Fixed
  • Fixed generating the documentation on docs.rs.
    (#​2111)

[0.27.0] - 2023-08-28

Added
  • Added AT_EACCESS to AtFlags on all platforms but android
    (#​1995)
  • Add PF_ROUTE to SockType on macOS, iOS, all of the BSDs, Fuchsia, Haiku, Illumos.
    (#​1867)
  • Added nix::ucontext module on aarch64-unknown-linux-gnu.
    (#1662)
  • Added CanRaw to SockProtocol and CanBcm as a separate SocProtocol constant.
    (#​1912)
  • Added Generic and NFLOG to SockProtocol.
    (#​2092)
  • Added mq_timedreceive to ::nix::mqueue.
    ([#​1966])(#​1966)
  • Added LocalPeerPid to nix::sys::socket::sockopt for macOS. (#​1967)
  • Added TFD_TIMER_CANCEL_ON_SET to ::nix::sys::time::TimerSetTimeFlags on Linux and Android.
    (#​2040)
  • Added SOF_TIMESTAMPING_OPT_ID and SOF_TIMESTAMPING_OPT_TSONLY to nix::sys::socket::TimestampingFlag.
    (#​2048)
  • Enabled socket timestamping options on Android. (#​2077)
  • Added vsock support for macOS (#​2056)
  • Added SO_SETFIB and SO_USER_COOKIE to nix::sys::socket::sockopt for FreeBSD.
    (#​2085)
  • Added SO_RTABLE for OpenBSD and SO_ACCEPTFILTER for FreeBSD/NetBSD to nix::sys::socket::sockopt.
    (#​2085)
  • Added MSG_WAITFORONE to MsgFlags on Android, Fuchsia, Linux, NetBSD,
    FreeBSD, OpenBSD, and Solaris.
    (#​2014)
  • Added SO_TS_CLOCK for FreeBSD to nix::sys::socket::sockopt.
    (#​2093)
  • Added support for prctl in Linux.
    (#1550)
  • nix::socket and nix::select are now available on Redox.
    (#​2012)
  • Implemented AsFd, AsRawFd, FromRawFd, and IntoRawFd for mqueue::MqdT.
    (#​2097)
  • Add the ability to set kevent_flags on SigEvent.
    (#​1731)
Changed
  • All Cargo features have been removed from the default set. Users will need to
    specify which features they depend on in their Cargo.toml.
    (#​2091)

  • Implemented I/O safety for many, but not all, of Nix's APIs. Many public
    functions argument and return types have changed:

    Original Type New Type
    AsRawFd AsFd
    RawFd BorrowedFd or OwnedFd

    (#1906)

  • Use I/O safety with copy_file_range, and expose it on FreeBSD.
    (#1906)

  • The MSRV is now 1.65
    (#​1862)
    (#​2104)

  • The epoll interface now uses a type.
    (#​1882)

  • With I/O-safe type applied in pty::OpenptyResult and pty::ForkptyResult,
    users no longer need to manually close the file descriptors in these types.
    (#​1921)

  • Refactored name parameter of mq_open and mq_unlink to be generic over
    NixPath.
    (#​2102).

  • Made clone unsafe, like fork.
    (#​1993)

Removed
  • sys::event::{kevent, kevent_ts} are deprecated in favor of
    sys::kevent::Kqueue::kevent, and sys::event::kqueue is deprecated in
    favor of sys::kevent::Kqueue::new.
    (#​1943)
  • Removed deprecated IoVec API.
    (#​1855)
  • Removed deprecated net APIs.
    (#​1861)
  • nix::sys::signalfd::signalfd is deprecated. Use
    nix::sys::signalfd::SignalFd instead.
    (#​1938)
  • Removed SigEvent support on Fuchsia, where it was unsound.
    (#​2079)
  • Removed flock from ::nix::fcntl on Solaris.
    (#​2082)

[0.26.3] - 2023-08-27

Fixed
  • Fix: send ETH_P_ALL in htons format
    (#​1925)
  • Fix: recvmsg now sets the length of the received sockaddr_un field
    correctly on Linux platforms. (#​2041)
  • Fix potentially invalid conversions in
    SockaddrIn::from<std::net::SocketAddrV4>,
    SockaddrIn6::from<std::net::SockaddrV6>, IpMembershipRequest::new, and
    Ipv6MembershipRequest::new with future Rust versions.
    (#​2061)
  • Fixed an incorrect lifetime returned from recvmsg.
    (#​2095)

[0.26.2] - 2023-01-18

Fixed
  • Fix SockaddrIn6 bug that was swapping flowinfo and scope_id byte
    ordering.
    (#​1964)

[0.26.1] - 2022-11-29

Fixed
  • Fix UB with sys::socket::sockopt::SockType using SOCK_PACKET.
    (#​1821)

[0.26.0] - 2022-11-29

Added
  • Added SockaddrStorage::{as_unix_addr, as_unix_addr_mut}
    (#​1871)
  • Added MntFlags and unmount on all of the BSDs.
  • Added any() and all() to poll::PollFd.
    (#​1877)
  • Add MntFlags and unmount on all of the BSDs.
    (#​1849)
  • Added a Statfs::flags method.
    (#​1849)
  • Added NSFS_MAGIC FsType on Linux and Android.
    (#​1829)
  • Added sched_getcpu on platforms that support it.
    (#​1825)
  • Added sched_getaffinity and sched_setaffinity on FreeBSD.
    (#​1804)
  • Added line_discipline field to Termios on Linux, Android and Haiku
    (#​1805)
  • Expose the memfd module on FreeBSD (memfd was added in FreeBSD 13)
    (#​1808)
  • Added domainname field of UtsName on Android and Linux
    (#​1817)
  • Re-export RLIM_INFINITY from libc
    (#​1831)
  • Added syncfs(2) on Linux
    (#​1833)
  • Added faccessat(2) on illumos
    (#​1841)
  • Added eaccess() on FreeBSD, DragonFly and Linux (glibc and musl).
    (#​1842)
  • Added IP_TOS SO_PRIORITY and IPV6_TCLASS sockopts for Linux
    (#​1853)
  • Added new_unnamed and is_unnamed for UnixAddr on Linux and Android.
    (#​1857)
  • Added SockProtocol::Raw for raw sockets
    (#​1848)
  • added IP_MTU (IpMtu) IPPROTO_IP sockopt on Linux and Android.
    (#​1865)
Changed
  • The MSRV is now 1.56.1
    (#​1792)
  • The addr argument of sys::mman::mmap is now of type Option<NonZeroUsize>.
    (#​1870)
  • The length argument of sys::mman::mmap is now of type NonZeroUsize.
    (#​1873)
Fixed
  • Fixed using SockaddrStorage to store a Unix-domain socket address on Linux.
    (#​1871)
  • Fix microsecond calculation for TimeSpec.
    (#​1801)
  • Fix User::from_name and Group::from_name panicking
    when given a name containing a nul.
    (#​1815)
  • Fix User::from_uid and User::from_name crash on Android platform.
    (#​1824)
  • Workaround XNU bug causing netmasks returned by getifaddrs to misbehave.
    (#​1788)
Removed
  • Removed deprecated error constants and conversions.
    (#​1860)

[0.25.0] - 2022-08-13

Added
  • Added faccessat
    (#​1780)
  • Added memfd on Android.
    (#1773)
  • Added ETH_P_ALL to SockProtocol enum
    (#1768)
  • Added four non-standard Linux SysconfVar variants
    (#1761)
  • Added const constructors for TimeSpec and TimeVal
    (#1760)
  • Added chflags.
    (#1758)
  • Added aio_writev and aio_readv.
    (#1713)
  • impl From<uid_t> for Uid and From<gid_t> for Gid
    (#1727)
  • impl From<SockaddrIn> for std::net::SocketAddrV4 and
    impl From<SockaddrIn6> for std::net::SocketAddrV6.
    (#1711)
  • Added support for the x86_64-unknown-haiku target.
    (#1703)
  • Added ptrace::read_user and ptrace::write_user for Linux.
    (#1697)
  • Added getrusage and helper types UsageWho and Usage
    (#1747)
  • Added the DontRoute SockOpt
    (#1752)
  • Added signal::SigSet::from_sigset_t_unchecked().
    (#1741)
  • Added the Ipv4OrigDstAddr sockopt and control message.
    (#1772)
  • Added the Ipv6OrigDstAddr sockopt and control message.
    (#1772)
  • Added the Ipv4SendSrcAddr control message.
    (#1776)
Changed
  • Reimplemented sendmmsg/recvmmsg to avoid allocations and with better API
    (#1744)

  • Rewrote the aio module. The new module:

    • Does more type checking at compile time rather than runtime.
    • Gives the caller control over whether and when to Box an aio operation.
    • Changes the type of the priority arguments to i32.
    • Changes the return type of aio_return to usize.
      (#1713)
  • nix::poll::ppoll: sigmask parameter is now optional.
    (#1739)

  • Changed gethostname to return an owned OsString.
    (#1745)

  • signal:SigSet is now marked as repr(transparent).
    (#1741)

Removed
  • Removed support for resubmitting partially complete lio_listio operations.
    It was too complicated, and didn't fit Nix's theme of zero-cost abstractions.
    Instead, it can be reimplemented downstream.
    (#1713)

[0.24.2] - 2022-07-17

Fixed
  • Fixed buffer overflow in nix::sys::socket::recvfrom.
    (#1763)
  • Enabled SockaddrStorage::{as_link_addr, as_link_addr_mut} for Linux-like
    operating systems.
    (#1729)
  • Fixed SockaddrLike::from_raw implementations for VsockAddr and
    SysControlAddr.
    (#1736)

[0.24.1] - 2022-04-22

Fixed
  • Fixed UnixAddr::size on Linux-based OSes.
    (#1702)

[0.24.0] - 2022-04-21

Added
  • Added fine-grained features flags. Most Nix functionality can now be
    conditionally enabled. By default, all features are enabled.
    (#1611)
  • Added statfs FS type magic constants for target_os = "android"
    and synced constants with libc v0.2.121.
    (#1690)
  • Added fexecve on DragonFly.
    (#1577)
  • sys::uio::IoVec is now Send and Sync
    (#1582)
  • Added EPOLLEXCLUSIVE on Android.
    (#1567)
  • Added fdatasync for FreeBSD, Fuchsia, NetBSD, and OpenBSD.
    (#1581)
  • Added sched_setaffinity and sched_getaffinity on DragonFly.
    (#1537)
  • Added posix_fallocate on DragonFly.
    (#1621)
  • Added SO_TIMESTAMPING support
    (#1547)
  • Added getter methods to MqAttr struct
    (#1619)
  • Added the TxTime sockopt and control message.
    (#1564)
  • Added POSIX per-process timer support
    (#1622)
  • Added sendfile on DragonFly.
    (#1615)
  • Added UMOUNT_NOFOLLOW, FUSE_SUPER_MAGIC on Linux.
    (#1634)
  • Added getresuid, setresuid, getresgid, and setresgid on DragonFly, FreeBSD, and OpenBSD.
    (#1628)
  • Added MAP_FIXED_NOREPLACE on Linux.
    (#1636)
  • Added fspacectl on FreeBSD
    (#1640)
  • Added accept4 on DragonFly, Emscripten, Fuchsia, Illumos, and NetBSD.
    (#1654)
  • Added AsRawFd implementation on OwningIter.
    (#1563)
  • Added process_vm_readv and process_vm_writev on Android.
    (#1557)
  • Added nix::ucontext module on s390x.
    (#1662)
  • Implemented Extend, FromIterator, and IntoIterator for SigSet and
    added SigSet::iter and SigSetIter.
    (#1553)
  • Added ENOTRECOVERABLE and EOWNERDEAD error codes on DragonFly.
    (#1665)
  • Implemented Read and Write for &PtyMaster
    (#1664)
  • Added MSG_NOSIGNAL for Android, Dragonfly, FreeBSD, Fuchsia, Haiku, Illumos, Linux, NetBSD, OpenBSD and Solaris.
    (#1670)
  • Added waitid.
    (#1584)
  • Added Ipv6DontFrag for android, iOS, linux and macOS.
  • Added IpDontFrag for iOS, macOS.
    (#1692)
Changed
  • mqueue functions now operate on a distinct type, nix::mqueue::MqdT.
    Accessors take this type by reference, not by value.
    (#1639)
  • Removed SigSet::extend in favor of <SigSet as Extend<Signal>>::extend.
    Because of this change, you now need use std::iter::Extend to call extend
    on a SigSet.
    (#1553)
  • Removed the the PATH_MAX restriction from APIs accepting paths. Paths
    will now be allocated on the heap if they are too long. In addition, large
    instruction count improvements (~30x) were made to path handling.
    (#1656)
  • Changed getrlimit and setrlimit to use rlim_t directly
    instead of Option<rlim_t>.
    (#1668)
  • Deprecated InetAddr and SockAddr in favor of SockaddrIn, SockaddrIn6,
    and SockaddrStorage.
    (#1684)
  • Deprecated IpAddr, Ipv4Addr, and Ipv6Addr in favor of their equivalents
    from the standard library.
    (#1685)
  • uname now returns a Result<UtsName> instead of just a UtsName and
    ignoring failures from libc. And getters on the UtsName struct now return
    an &OsStr instead of &str.
    (#1672)
  • Replaced IoVec with IoSlice and IoSliceMut, and replaced IoVec::from_slice with
    IoSlice::new. (#1643)
Fixed
  • InetAddr::from_std now sets the sin_len/sin6_len fields on the BSDs.
    (#1642)
  • Fixed a panic in LinkAddr::addr. That function now returns an Option.
    (#1675)
    (#1677)
Removed
  • Removed public access to the inner fields of NetlinkAddr, AlgAddr,
    SysControlAddr, LinkAddr, and VsockAddr.
    (#1614)
  • Removed EventFlag::EV_SYSFLAG.
    (#1635)

[0.23.1] - 2021-12-16

Changed
  • Relaxed the bitflags requirement from 1.3.1 to 1.1. This partially reverts
    #​1492. From now on, the MSRV is not guaranteed to work with all versions of
    all dependencies, just with some version of all dependencies.
    (#1607)
Fixed
  • Fixed soundness issues in FdSet::insert, FdSet::remove, and
    FdSet::contains involving file descriptors outside of the range
    0..FD_SETSIZE.
    (#1575)

[0.23.0] - 2021-09-28

Added
  • Added the LocalPeerCred sockopt.
    (#1482)
  • Added TimeSpec::from_duration and TimeSpec::from_timespec
    (#1465)
  • Added IPV6_V6ONLY sockopt.
    (#1470)
  • Added impl From<User> for libc::passwd trait implementation to convert a User
    into a libc::passwd. Consumes the User struct to give ownership over
    the member pointers.
    (#1471)
  • Added pthread_kill.
    (#1472)
  • Added mknodat.
    (#1473)
  • Added setrlimit and getrlimit.
    (#1302)
  • Added ptrace::interrupt method for platforms that support PTRACE_INTERRUPT
    (#1422)
  • Added IP6T_SO_ORIGINAL_DST sockopt.
    (#1490)
  • Added the PTRACE_EVENT_STOP variant to the sys::ptrace::Event enum
    (#1335)
  • Exposed SockAddr::from_raw_sockaddr
    (#1447)
  • Added TcpRepair
    (#1503)
  • Enabled pwritev and preadv for more operating systems.
    (#1511)
  • Added support for TCP_MAXSEG TCP Maximum Segment Size socket options
    (#1292)
  • Added Ipv4RecvErr and Ipv6RecvErr sockopts and associated control messages.
    (#1514)
  • Added AsRawFd implementation on PollFd.
    (#1516)
  • Added Ipv4Ttl and Ipv6Ttl sockopts.
    (#1515)
  • Added MAP_EXCL, MAP_ALIGNED_SUPER, and MAP_CONCEAL mmap flags, and
    exposed MAP_ANONYMOUS for all operating systems.
    (#1522)
    (#1525)
    (#1531)
    (#1534)
  • Added read/write accessors for 'events' on PollFd.
    (#1517)
Changed
  • FdSet::{contains, highest, fds} no longer require a mutable reference.
    (#1464)
  • User::gecos and corresponding libc::passwd::pw_gecos are supported on
    64-bit Android, change conditional compilation to include the field in
    64-bit Android builds
    (#1471)
  • eventfds are supported on Android, change conditional compilation to
    include sys::eventfd::eventfd and sys::eventfd::EfdFlagsfor Android
    builds.
    (#1481)
  • Most enums that come from C, for example Errno, are now marked as
    #[non_exhaustive].
    (#1474)
  • Many more functions, mostly contructors, are now const.
    (#1476)
    (#1492)
  • sys::event::KEvent::filter now returns a Result instead of being
    infalliable. The only cases where it will now return an error are cases
    where it previously would've had undefined behavior.
    (#1484)
  • Minimum supported Rust version is now 1.46.0.
    (#​1492)
  • Rework UnixAddr to encapsulate internals better in order to fix soundness
    issues. No longer allows creating a UnixAddr from a raw sockaddr_un.
    (#​1496)
  • Raised bitflags to 1.3.0 and the MSRV to 1.46.0.
    (#​1492)
Fixed
  • posix_fadvise now returns errors in the conventional way, rather than as a
    non-zero value in Ok().
    (#1538)
  • Added more errno definitions for better backwards compatibility with
    Nix 0.21.0.
    (#1467)
  • Fixed potential undefined behavior in Signal::try_from on some platforms.
    (#1484)
  • Fixed buffer overflow in unistd::getgrouplist.
    (#1545)
Removed
  • Removed a couple of termios constants on redox that were never actually
    supported.
    (#1483)
  • Removed nix::sys::signal::NSIG. It was of dubious utility, and not correct
    for all platforms.
    (#1484)
  • Removed support for 32-bit Apple targets, since they've been dropped by both
    Rustc and Xcode.
    (#1492)
  • Deprecated SockAddr/InetAddr::to_str in favor of ToString::to_string
    (#1495)
  • Removed SigevNotify on OpenBSD and Redox.
    (#1511)

[0.22.3] - 22 January 2022

Changed
  • Relaxed the bitflags requirement from 1.3.1 to 1.1. This partially reverts
    #​1492. From now on, the MSRV is not guaranteed to work with all versions of
    all dependencies, just with some version of all dependencies.
    (#1607)

[0.22.2] - 28 September 2021

Fixed
  • Fixed buffer overflow in unistd::getgrouplist.
    (#1545)
  • Added more errno definitions for better backwards compatibility with
    Nix 0.21.0.
    (#1467)

[0.22.1] - 13 August 2021

Fixed
  • Locked bitflags to < 1.3.0 to fix the build with rust < 1.46.0.
Removed
  • Removed a couple of termios constants on redox that were never actually
    supported.
    (#1483)

[0.22.0] - 9 July 2021

Added
  • Added if_nameindex (#1445)
  • Added nmount for FreeBSD.
    (#1453)
  • Added IpFreebind socket option (sockopt) on Linux, Fuchsia and Android.
    (#1456)
  • Added TcpUserTimeout socket option (sockopt) on Linux and Fuchsia.
    (#1457)
  • Added renameat2 for Linux
    (#1458)
  • Added RxqOvfl support on Linux, Fuchsia and Android.
    (#1455)
Changed
  • ptsname_r now returns a lossily-converted string in the event of bad UTF,
    just like ptsname.
    (#​1446)
  • Nix's error type is now a simple wrapper around the platform's Errno. This
    means it is now Into<std::io::Error>. It's also Clone, Copy, Eq, and
    has a small fixed size. It also requires less typing. For example, the old
    enum variant nix::Error::Sys(nix::errno::Errno::EINVAL) is now simply
    nix::Error::EINVAL.
    (#​1446)

[0.21.2] - 29 September 2021

Fixed
  • Fixed buffer overflow in unistd::getgrouplist.
    (#1545)

[0.21.1] - 13 August 2021

Fixed
  • Locked bitflags to < 1.3.0 to fix the build with rust < 1.46.0.
Removed
  • Removed a couple of termios constants on redox that were never actually
    supported.
    (#1483)

[0.21.0] - 31 May 2021

Added
  • Added getresuid and getresgid
    (#1430)
  • Added TIMESTAMPNS support for linux
    (#1402)
  • Added sendfile64 (#1439)
  • Added MS_LAZYTIME to MsFlags
    (#1437)
Changed
  • Made forkpty unsafe, like fork
    (#1390)
  • Made Uid, Gid and Pid methods from_raw and as_raw a const fn
    (#1429)
  • Made Uid::is_root a const fn
    (#1429)
  • AioCb is now always pinned. Once a libc::aiocb gets sent to the kernel,
    its address in memory must not change. Nix now enforces that by using
    std::pin. Most users won't need to change anything, except when using
    aio_suspend. See that method's documentation for the new usage.
    (#1440)
  • LioCb is now constructed using a distinct LioCbBuilder struct. This
    avoids a soundness issue with the old LioCb. Usage is similar but
    construction now uses the builder pattern. See the documentation for
    details.
    (#1440)
  • Minimum supported Rust version is now 1.41.0.
    (#​1440)
  • Errno aliases are now associated consts on Errno, instead of consts in the
    errno module.
    (#1452)
Fixed
  • Allow sockaddr_ll size, as reported by the Linux kernel, to be smaller then it's definition
    (#1395)
  • Fix spurious errors using sendmmsg with multiple cmsgs
    (#1414)
  • Added Errno::EOPNOTSUPP to FreeBSD, where it was missing.
    (#1452)
Removed
  • Removed sys::socket::accept4 from Android arm because libc removed it in
    version 0.2.87.
    (#​1399)
  • AioCb::from_boxed_slice and AioCb::from_boxed_mut_slice have been
    removed. They were useful with earlier versions of Rust, but should no
    longer be needed now that async/await are available. AioCbs now work
    exclusively with borrowed buffers, not owned ones.
    (#1440)
  • Removed some Errno values from platforms where they aren't actually defined.
    (#1452)

[0.20.2] - 28 September 2021

Fixed
  • Fixed buffer overflow in unistd::getgrouplist.
    (#1545)

[0.20.1] - 13 August 2021

Fixed
  • Locked bitflags to < 1.3.0 to fix the build with rust < 1.46.0.
Removed
  • Removed a couple of termios constants on redox that were never actually
    supported.
    (#1483)

[0.20.0] - 20 February 2021

Added
  • Added a passwd field to Group (#1338)
  • Added mremap (#1306)
  • Added personality (#1331)
  • Added limited Fuchsia support (#1285)
  • Added getpeereid (#1342)
  • Implemented IntoIterator for Dir
    (#1333).
Changed
  • Minimum supported Rust version is now 1.40.0.
    (#​1356)
  • i686-apple-darwin has been demoted to Tier 2 support, because it's deprecated
    by Xcode.
    (#1350)
  • Fixed calling recvfrom on an AddrFamily::Packet socket
    (#1344)
Fixed
  • TimerFd now closes the underlying fd on drop.
    (#​1381)
  • Define *_MAGIC filesystem constants on Linux s390x
    (#1372)
  • mqueue, sysinfo, timespec, statfs, test_ptrace_syscall() on x32
    (#1366)
Removed
  • Dir, SignalFd, and PtyMaster are no longer Clone.
    (#1382)
  • Removed SockLevel, which hasn't been used for a few years
    (#1362)
  • Removed both Copy and Clone from TimerFd.
    (#​1381)

[0.19.1] - 28 November 2020

Fixed
  • Fixed bugs in recvmmsg.
    (#1341)

[0.19.0] - 6 October 2020

Added
  • Added Netlink protocol families to the SockProtocol enum
    (#1289)
  • Added clock_gettime, clock_settime, clock_getres,
    clock_getcpuclockid functions and ClockId struct.
    (#1281)
  • Added wrapper functions for PTRACE_SYSEMU and PTRACE_SYSEMU_SINGLESTEP.
    (#1300)
  • Add support for Vsock on Android rather than just Linux.
    (#1301)
  • Added TCP_KEEPCNT and TCP_KEEPINTVL TCP keepalive options.
    (#1283)
Changed
  • Expose SeekData and SeekHole on all Linux targets
    (#1284)
  • Changed unistd::{execv,execve,execvp,execvpe,fexecve,execveat} to take both &[&CStr] and &[CString] as its list argument(s).
    (#1278)
  • Made unistd::fork an unsafe funtion, bringing it in line with libstd's decision.
    (#1293)

[0.18.0] - 26 July 2020

Added
  • Added fchown(2) wrapper.
    (#1257)
  • Added support on linux systems for MAP_HUGE_SIZE family of flags.
    (#1211)
  • Added support for F_OFD_* fcntl commands on Linux and Android.
    (#1195)
  • Added env::clearenv(): calls libc::clearenv on platforms
    where it's available, and clears the environment of all variables
    via std::env::vars and std::env::remove_var on others.
    (#1185)
  • FsType inner value made public.
    (#1187)
  • Added unistd::setfsuid and unistd::setfsgid to set the user or group
    identity for filesystem checks per-thread.
    (#1163)
  • Derived Ord, PartialOrd for unistd::Pid (#1189)
  • Added select::FdSet::fds method to iterate over file descriptors in a set.
    (#​1207)
  • Added support for UDP generic segmentation offload (GSO) and generic
    receive offload (GRO) (#​1209)
  • Added support for sendmmsg and recvmmsg calls
    (#1208)
  • Added support for SCM_CREDS messages (UnixCredentials) on FreeBSD/DragonFly
    (#1216)
  • Added BindToDevice socket option (sockopt) on Linux
    (#1233)
  • Added EventFilter bitflags for EV_DISPATCH and EV_RECEIPT on OpenBSD.
    (#1252)
  • Added support for Ipv4PacketInfo and Ipv6PacketInfo to ControlMessage.
    (#1222)
  • CpuSet and UnixCredentials now implement Default.
    (#1244)
  • Added unistd::ttyname
    (#1259)
  • Added support for Ipv4PacketInfo and Ipv6PacketInfo to ControlMessage for iOS and Android.
    (#1265)
  • Added support for TimerFd.
    (#1261)
Changed
  • Changed fallocate return type from c_int to () (#1201)
  • Enabled sys::ptrace::setregs and sys::ptrace::getregs on x86_64-unknown-linux-musl target
    (#1198)
  • On Linux, ptrace::write is now an unsafe function. Caveat programmer.
    (#1245)
  • execv, execve, execvp and execveat in ::nix::unistd and reboot in
    ::nix::sys::reboot now return Result<Infallible> instead of Result<Void> (#1239)
  • sys::socket::sockaddr_storage_to_addr is no longer unsafe. So is
    offset_of!.
  • sys::socket::sockaddr_storage_to_addr, offset_of!, and Errno::clear are
    no longer unsafe.
  • SockAddr::as_ffi_pair,sys::socket::sockaddr_storage_to_addr, offset_of!,
    and Errno::clear are no longer unsafe.
    (#1244)
  • Several Inotify methods now take self by value instead of by reference
    (#1244)
  • nix::poll::ppoll: timeout parameter is now optional, None is equivalent for infinite timeout.
Fixed
  • Fixed getsockopt. The old code produced UB which triggers a panic with
    Rust 1.44.0.
    (#1214)

  • Fixed a bug in nix::unistd that would result in an infinite loop
    when a group or user lookup required a buffer larger than
    16KB. (#1198)

  • Fixed unaligned casting of cmsg_data to af_alg_iv (#1206)

  • Fixed readlink/readlinkat when reading symlinks longer than PATH_MAX (#1231)

  • PollFd, EpollEvent, IpMembershipRequest, Ipv6MembershipRequest,
    TimeVal, and IoVec are now repr(transparent). This is required for
    correctness's sake across all architectures and compilers, though now bugs
    have been reported so far.
    (#1243)

  • Fixed unaligned pointer read in Inotify::read_events.
    (#1244)

Removed
  • Removed sys::socket::addr::from_libc_sockaddr from the public API.
    (#1215)

  • Removed sys::termios::{get_libc_termios, get_libc_termios_mut, update_wrapper
    from the public API. These were previously hidden in the docs but still usable
    by downstream.
    (#1235)

  • Nix no longer implements NixPath for Option<P> where P: NixPath. Most
    Nix functions that accept NixPath arguments can't do anything useful with
    None. The exceptions (mount and quotactl_sync) already take explicitly
    optional arguments.
    (#1242)

  • Removed unistd::daemon and unistd::pipe2 on OSX and ios
    (#1255)

  • Removed sys::event::FilterFlag::NOTE_EXIT_REPARENTED and
    sys::event::FilterFlag::NOTE_REAP on OSX and ios.
    (#1255)

  • Removed sys::ptrace::ptrace on Android and Linux.
    (#1255)

  • Dropped support for powerpc64-unknown-linux-gnu
    (#1266)

[0.17.0] - 3 February 2020

Added
  • Add CLK_TCK to SysconfVar
    (#1177)
Removed
  • Removed deprecated Error::description from error types
    (#1175)

[0.16.1] - 23 December 2019

Fixed
  • Fixed the build for OpenBSD
    (#1168)

[0.16.0] - 1 December 2019

Added
  • Added ptrace::seize(): similar to attach() on Linux
    but with better-defined semantics.
    (#1154)

  • Added Signal::as_str(): returns signal name as &'static str
    (#1138)

  • Added posix_fallocate.
    (#​1105)

  • Implemented Default for FdSet
    (#​1107)

  • Added NixPath::is_empty.
    (#​1107)

  • Added mkfifoat
    (#​1133)

  • Added User::from_uid, User::from_name, User::from_gid and
    Group::from_name,
    (#​1139)

  • Added linkat
    (#​1101)

  • Added sched_getaffinity.
    (#​1148)

  • Added optional Signal argument to ptrace::{detach, syscall} for signal
    injection. (#​1083)

Changed
  • sys::termios::BaudRate now implements TryFrom<speed_t> instead of
    From<speed_t>. The old From implementation would panic on failure.
    (#​1159)

  • sys::socket::ControlMessage::ScmCredentials and
    sys::socket::ControlMessageOwned::ScmCredentials now wrap UnixCredentials
    rather than libc::ucred.
    (#​1160)

  • sys::socket::recvmsg now takes a plain Vec instead of a CmsgBuffer
    implementor. If you were already using cmsg_space!, then you needn't worry.
    (#​1156)

  • sys::socket::recvfrom now returns
    Result<(usize, Option<SockAddr>)> instead of Result<(usize, SockAddr)>.
    (#​1145)

  • Signal::from_c_int has been replaced by Signal::try_from
    (#​1113)

  • Changed readlink and readlinkat to return OsString
    (#​1109)

    # use nix::fcntl::{readlink, readlinkat};
    // the buffer argument of `readlink` and `readlinkat` has been removed,
    // and the return value is now an owned type (`OsString`).
    // Existing code can be updated by removing the buffer argument
    // and removing any clone or similar operation on the output
    
    // old code `readlink(&path, &mut buf)` can be replaced with the following
    let _: OsString = readlink(&path);
    
    // old code `readlinkat(dirfd, &path, &mut buf)` can be replaced with the following
    let _: OsString = readlinkat(dirfd, &path);
    
  • Minimum supported Rust version is now 1.36.0.
    (#​1108)

  • Ipv4Addr::octets, Ipv4Addr::to_std, Error::as_errno,
    ForkResult::is_child, ForkResult::is_parent, Gid::as_raw,
    Uid::is_root, Uid::as_raw, Pid::as_raw, and PollFd::revents now take
    self by value.
    (#​1107)

  • Type &CString for parameters of exec(v|ve|vp|vpe|veat) are changed to &CStr.
    (#​1121)

Fixed
  • Fix length of abstract socket addresses
    (#​1120)

  • Fix initialization of msghdr in recvmsg/sendmsg when built with musl
    (#​1136)

Removed
  • Remove the deprecated CmsgSpace.
    (#​1156)

Configuration

📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR has been generated by Renovate Bot.

This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [nix](https://github.com/nix-rust/nix) | workspace.dependencies | minor | `0.30.1` → `0.31.0` | --- ### Release Notes <details> <summary>nix-rust/nix (nix)</summary> ### [`v0.31.1`](https://github.com/nix-rust/nix/blob/HEAD/CHANGELOG.md#0311---2026-01-23) [Compare Source](https://github.com/nix-rust/nix/compare/v0.31.0...v0.31.1) ##### Added - termios: Add definition for IUCLC to supported platforms ([#&#8203;2702](https://github.com/nix-rust/nix/pull/2702)) - termios: Add definition for XCASE for supported platforms ([#&#8203;2703](https://github.com/nix-rust/nix/pull/2703)) ### [`v0.31.0`](https://github.com/nix-rust/nix/blob/HEAD/CHANGELOG.md#0310---2026-01-22) [Compare Source](https://github.com/nix-rust/nix/compare/v0.30.1...v0.31.0) ##### Added - Added the UDP GSO/GRO socket options and CMsgs on Android. This includes the following types: - UdpGsoSegment - UdpGroSegment - ControlMessage::UdpGsoSegments - ControlMessageOwned::UdpGroSegments ([#&#8203;2666](https://github.com/nix-rust/nix/pull/2666)) - Define errno EWOULDBLOCK as an alias of EAGAIN to match the AIX libc definition. ([#&#8203;2692](https://github.com/nix-rust/nix/pull/2692)) - Enable module `ifaddrs` on GNU Hurd ([#&#8203;2697](https://github.com/nix-rust/nix/pull/2697)) - Add termios `OutputFlags::OFILL` for Linux, Android, Aix, Cygwin, Fuchsia, Haiku, GNU/Hurd, Nto, Redox, Illumos, Solaris and Apple OSes. ([#&#8203;2701](https://github.com/nix-rust/nix/pull/2701)) - add sync() for cygwin ([#&#8203;2708](https://github.com/nix-rust/nix/pull/2708)) ##### Changed - changed `EpollEvent` methods to be `const` ([#&#8203;2656](https://github.com/nix-rust/nix/pull/2656)) - Bumped libc to [0.2.180](https://github.com/rust-lang/libc/releases/tag/0.2.180) ([#&#8203;2724](https://github.com/nix-rust/nix/pull/2724)) ##### Fixed - Fixed `nix::sys::ptrace::syscall_info`, which was not setting the `data` argument properly, causing garbage values to be returned. ([#&#8203;2653](https://github.com/nix-rust/nix/pull/2653)) - Cast the 'addr' argument of 'madvise()' to '\*mut u8' on AIX to match the signature in the AIX libc. ([#&#8203;2655](https://github.com/nix-rust/nix/pull/2655)) - Fixed the Dir module on NTO, Solaris, Hurd, and possibly other platforms. The d\_name field was not copied correctly on those platforms. For some other platforms, it could be copied incorrectly for files with very long pathnames. ([#&#8203;2674](https://github.com/nix-rust/nix/pull/2674)) - Fix the build on Illumos ([#&#8203;2694](https://github.com/nix-rust/nix/pull/2694)) ##### Removed - Removed `Eq` and `PartialEq` implementations from `SigHandler`, because they never worked reliably. The suggested alternative is `matches!`. For example: ```` let h: SigHandler = ... if matches!(h, SigHandler::SigIgn) { ... } ``` ([#&#8203;2642](https://github.com/nix-rust/nix/pull/2642)) ```` - Removed `IFF_NOTRAILERS` by NetBSD, as it has been removed upstream and from libc ([#&#8203;2724](https://github.com/nix-rust/nix/pull/2724)) #### \[0.30.1] - 2025-05-04 ##### Fixed - doc.rs build ([#&#8203;2634](https://github.com/nix-rust/nix/pull/2634)) #### \[0.30.0] - 2025-04-29 ##### Added - Add socket option `IPV6_PKTINFO` for BSDs/Linux/Android, also `IPV6_RECVPKTINFO` for DragonFlyBSD ([#&#8203;2113](https://github.com/nix-rust/nix/pull/2113)) - Add `fcntl`'s `F_PREALLOCATE` constant for Apple targets. ([#&#8203;2393](https://github.com/nix-rust/nix/pull/2393)) - Improve support for extracting the TTL / Hop Limit from incoming packets and support for DSCP (ToS / Traffic Class). ([#&#8203;2425](https://github.com/nix-rust/nix/pull/2425)) - Add socket option IP\_TOS (nix::sys::socket::sockopt::IpTos) IPV6\_TCLASS (nix::sys::socket::sockopt::Ipv6TClass) on Android/FreeBSD ([#&#8203;2464](https://github.com/nix-rust/nix/pull/2464)) - Add `SeekData` and `SeekHole` to `Whence` for hurd and apple targets ([#&#8203;2473](https://github.com/nix-rust/nix/pull/2473)) - Add `From` trait implementation between `SocketAddr` and `Sockaddr`, `Sockaddr6` ([#&#8203;2474](https://github.com/nix-rust/nix/pull/2474)) - Added wrappers for `posix_spawn` API ([#&#8203;2475](https://github.com/nix-rust/nix/pull/2475)) - Add the support for Emscripten. ([#&#8203;2477](https://github.com/nix-rust/nix/pull/2477)) - Add fcntl constant `F_RDADVISE` for Apple target ([#&#8203;2480](https://github.com/nix-rust/nix/pull/2480)) - Add fcntl constant `F_RDAHEAD` for Apple target ([#&#8203;2482](https://github.com/nix-rust/nix/pull/2482)) - Add `F_LOG2PHYS` and `F_LOG2PHYS_EXT` for Apple target ([#&#8203;2483](https://github.com/nix-rust/nix/pull/2483)) - `MAP_SHARED_VALIDATE` was added for all linux targets. & `MAP_SYNC` was added for linux with the exclusion of mips architecures, and uclibc ([#&#8203;2499](https://github.com/nix-rust/nix/pull/2499)) - Add `getregs()`/`getregset()`/`setregset()` for Linux/musl/aarch64 ([#&#8203;2502](https://github.com/nix-rust/nix/pull/2502)) - Add FcntlArgs `F_TRANSFEREXTENTS` constant for Apple targets ([#&#8203;2504](https://github.com/nix-rust/nix/pull/2504)) - Add `MapFlags::MAP_STACK` in `sys::man` for netbsd ([#&#8203;2526](https://github.com/nix-rust/nix/pull/2526)) - Add support for `libc::LOCAL_PEERTOKEN` in `getsockopt`. ([#&#8203;2529](https://github.com/nix-rust/nix/pull/2529)) - Add support for `syslog`, `openlog`, `closelog` on all `unix`. ([#&#8203;2537](https://github.com/nix-rust/nix/pull/2537)) - Add the `TCP_FUNCTION_BLK` sockopt, on FreeBSD. ([#&#8203;2539](https://github.com/nix-rust/nix/pull/2539)) - Implements `Into<OwnedFd>` for `PtyMaster/Fanotify/Inotify/SignalFd/TimerFd` ([#&#8203;2548](https://github.com/nix-rust/nix/pull/2548)) - Add `MremapFlags::MREMAP_DONTUNMAP` to `sys::mman::mremap` for linux target. ([#&#8203;2555](https://github.com/nix-rust/nix/pull/2555)) - Added `sockopt_impl!` to the public API. It's now possible for users to define their own sockopts without needing to make a PR to Nix. ([#&#8203;2556](https://github.com/nix-rust/nix/pull/2556)) - Add the `TCP_FUNCTION_ALIAS` sockopt, on FreeBSD. ([#&#8203;2558](https://github.com/nix-rust/nix/pull/2558)) - Add `sys::mman::MmapAdvise` `MADV_PAGEOUT`, `MADV_COLD`, `MADV_WIPEONFORK`, `MADV_KEEPONFORK` for Linux and Android targets ([#&#8203;2559](https://github.com/nix-rust/nix/pull/2559)) - Add socket protocol `Sctp`, as well as `MSG_NOTIFICATION` for non-Android Linux targets. ([#&#8203;2562](https://github.com/nix-rust/nix/pull/2562)) - Added `from_owned_fd` constructor to `EventFd` ([#&#8203;2563](https://github.com/nix-rust/nix/pull/2563)) - Add `sys::mman::MmapAdvise` `MADV_POPULATE_READ`, `MADV_POPULATE_WRITE` for Linux and Android targets ([#&#8203;2565](https://github.com/nix-rust/nix/pull/2565)) - Added `from_owned_fd` constructor to `PtyMaster/Fanotify/Inotify/SignalFd/TimerFd` ([#&#8203;2566](https://github.com/nix-rust/nix/pull/2566)) - Added `FcntlArg::F_READAHEAD` for FreeBSD target ([#&#8203;2569](https://github.com/nix-rust/nix/pull/2569)) - Added `sockopt::LingerSec` for Apple targets ([#&#8203;2572](https://github.com/nix-rust/nix/pull/2572)) - Added `sockopt::EsclBind` for solarish targets ([#&#8203;2573](https://github.com/nix-rust/nix/pull/2573)) - Exposed the `std::os::fd::AsRawFd` trait method for `nix::sys::fanotify::Fanotify` struct ([#&#8203;2575](https://github.com/nix-rust/nix/pull/2575)) - Add support for syslog's `setlogmask` on all `unix`. ([#&#8203;2579](https://github.com/nix-rust/nix/pull/2579)) - Added Fuchsia support for `ioctl`. ([#&#8203;2580](https://github.com/nix-rust/nix/pull/2580)) - Add `sys::socket::SockProtocol::EthIp`, `sys::socket::SockProtocol::EthIpv6`, `sys::socket::SockProtocol::EthLoop` ([#&#8203;2581](https://github.com/nix-rust/nix/pull/2581)) - Add OpenHarmony target into CI and Update documents. ([#&#8203;2599](https://github.com/nix-rust/nix/pull/2599)) - Added the TcpMaxSeg `setsockopt` option for apple targets ([#&#8203;2603](https://github.com/nix-rust/nix/pull/2603)) - Add `FilAttach` and `FilDetach` to socket::sockopt for Illumos ([#&#8203;2611](https://github.com/nix-rust/nix/pull/2611)) - Add `PeerPidfd` (`SO_PEERPIDFD`) to `socket::sockopt` for Linux ([#&#8203;2620](https://github.com/nix-rust/nix/pull/2620)) - Added `socket::sockopt::AttachReusePortCbpf` for Linux ([#&#8203;2621](https://github.com/nix-rust/nix/pull/2621)) - Add `ptrace::syscall_info` for linux/glibc ([#&#8203;2627](https://github.com/nix-rust/nix/pull/2627)) ##### Changed - Module sys/signal now adopts I/O safety ([#&#8203;1936](https://github.com/nix-rust/nix/pull/1936)) - Change the type of the `name` argument of `memfd_create()` from `&CStr` to `<P: NixPath>(name: &P)` ([#&#8203;2431](https://github.com/nix-rust/nix/pull/2431)) - Public interfaces in `fcntl.rs` and `dir.rs` now use I/O-safe types. ([#&#8203;2434](https://github.com/nix-rust/nix/pull/2434)) - Module `sys/stat` now adopts I/O safety. ([#&#8203;2439](https://github.com/nix-rust/nix/pull/2439)) - Module unistd now adopts I/O safety. ([#&#8203;2440](https://github.com/nix-rust/nix/pull/2440)) - Module sys/fanotify now adopts I/O safety ([#&#8203;2443](https://github.com/nix-rust/nix/pull/2443)) - Socket option `IpTos` has been renamed to `Ipv4Tos`, the old symbol is deprecated since 0.30.0 ([#&#8203;2465](https://github.com/nix-rust/nix/pull/2465)) - Rename Flags `EventFlag` to `EvFlags`, and `MemFdCreateFlag` to `MFdFlags` ([#&#8203;2476](https://github.com/nix-rust/nix/pull/2476)) - Made `nix::sys::socket::UnknownCmsg` public and more readable ([#&#8203;2520](https://github.com/nix-rust/nix/pull/2520)) - recvmsg: take slice for cmsg\_buffer instead of Vec ([#&#8203;2524](https://github.com/nix-rust/nix/pull/2524)) - linkat: allow distinct types for path arguments ([#&#8203;2582](https://github.com/nix-rust/nix/pull/2582)) ##### Fixed - Disable unsupported signals on sparc-linux ([#&#8203;2454](https://github.com/nix-rust/nix/pull/2454)) - Fix cmsg\_len() return type on OpenHarmony ([#&#8203;2456](https://github.com/nix-rust/nix/pull/2456)) - The `ns` argument of `sys::prctl::set_timerslack()` should be of type `c_ulong` ([#&#8203;2505](https://github.com/nix-rust/nix/pull/2505)) - Properly exclude NUL characters from `OSString`s returned by `getsockopt`. ([#&#8203;2557](https://github.com/nix-rust/nix/pull/2557)) - Fixes the build on OpenHarmony ([#&#8203;2587](https://github.com/nix-rust/nix/pull/2587)) ##### Removed - Type `SigevNotify` is no longer `PartialEq`, `Eq` and `Hash` due to the use of `BorrowedFd` ([#&#8203;1936](https://github.com/nix-rust/nix/pull/1936)) - `EventFd::defuse()` is removed because it does nothing, `EventFd::arm()` is also removed for symmetry reasons. ([#&#8203;2452](https://github.com/nix-rust/nix/pull/2452)) - Removed the `Copy` trait from `PollFd` ([#&#8203;2631](https://github.com/nix-rust/nix/pull/2631)) #### \[0.29.0] - 2024-05-24 ##### Added - Add `getregset()/setregset()` for Linux/glibc/x86/x86\_64/aarch64/riscv64 and `getregs()/setregs()` for Linux/glibc/aarch64/riscv64 ([#&#8203;2044](https://github.com/nix-rust/nix/pull/2044)) - Add socket option Ipv6Ttl for apple targets. ([#&#8203;2287](https://github.com/nix-rust/nix/pull/2287)) - Add socket option UtunIfname. ([#&#8203;2325](https://github.com/nix-rust/nix/pull/2325)) - make SigAction repr(transparent) & can be converted to the libc raw type ([#&#8203;2326](https://github.com/nix-rust/nix/pull/2326)) - Add `From` trait implementation for conversions between `sockaddr_in` and `SockaddrIn`, `sockaddr_in6` and `SockaddrIn6` ([#&#8203;2328](https://github.com/nix-rust/nix/pull/2328)) - Add socket option ReusePortLb for FreeBSD. ([#&#8203;2332](https://github.com/nix-rust/nix/pull/2332)) - Added support for openat2 on linux. ([#&#8203;2339](https://github.com/nix-rust/nix/pull/2339)) - Add if\_indextoname function. ([#&#8203;2340](https://github.com/nix-rust/nix/pull/2340)) - Add `mount` and `unmount` API for apple targets. ([#&#8203;2347](https://github.com/nix-rust/nix/pull/2347)) - Added `_PC_MIN_HOLE_SIZE` for `pathconf` and `fpathconf`. ([#&#8203;2349](https://github.com/nix-rust/nix/pull/2349)) - Added `impl AsFd for pty::PtyMaster` ([#&#8203;2355](https://github.com/nix-rust/nix/pull/2355)) - Add `open` flag `O_SEARCH` to AIX, Empscripten, FreeBSD, Fuchsia, solarish, WASI ([#&#8203;2374](https://github.com/nix-rust/nix/pull/2374)) - Add prctl function `prctl_set_vma_anon_name` for Linux/Android. ([#&#8203;2378](https://github.com/nix-rust/nix/pull/2378)) - Add `sync(2)` for `apple_targets/solarish/haiku/aix/hurd`, `syncfs(2)` for `hurd` and `fdatasync(2)` for `aix/hurd` ([#&#8203;2379](https://github.com/nix-rust/nix/pull/2379)) - Add fdatasync support for Apple targets. ([#&#8203;2380](https://github.com/nix-rust/nix/pull/2380)) - Add `fcntl::OFlag::O_PATH` for FreeBSD and Fuchsia ([#&#8203;2382](https://github.com/nix-rust/nix/pull/2382)) - Added `PathconfVar::MIN_HOLE_SIZE` for apple\_targets. ([#&#8203;2388](https://github.com/nix-rust/nix/pull/2388)) - Add `open` flag `O_SEARCH` to apple\_targets ([#&#8203;2391](https://github.com/nix-rust/nix/pull/2391)) - `O_DSYNC` may now be used with `aio_fsync` and `fcntl` on FreeBSD. ([#&#8203;2404](https://github.com/nix-rust/nix/pull/2404)) - Added `Flock::relock` for upgrading and downgrading locks. ([#&#8203;2407](https://github.com/nix-rust/nix/pull/2407)) ##### Changed - Change the `ForkptyResult` type to the following repr so that the uninitialized `master` field won't be accessed in the child process: ````rs pub enum ForkptyResult { Parent { child: Pid, master: OwnedFd, }, Child, } ``` ([#&#8203;2315](https://github.com/nix-rust/nix/pull/2315)) ```` - Updated `cfg_aliases` dependency from version 0.1 to 0.2 ([#&#8203;2322](https://github.com/nix-rust/nix/pull/2322)) - Change the signature of `ptrace::write` and `ptrace::write_user` to make them safe ([#&#8203;2324](https://github.com/nix-rust/nix/pull/2324)) - Allow use of `SignalFd` through shared reference Like with many other file descriptors, concurrent use of signalfds is safe. Changing the signal mask of and reading signals from a signalfd can now be done with the `SignalFd` API even if other references to it exist. ([#&#8203;2367](https://github.com/nix-rust/nix/pull/2367)) - Changed tee, splice and vmsplice RawFd arguments to AsFd. ([#&#8203;2387](https://github.com/nix-rust/nix/pull/2387)) - Added I/O safety to the sys/aio module. Most functions that previously accepted a `AsRawFd` argument now accept an `AsFd` instead. ([#&#8203;2401](https://github.com/nix-rust/nix/pull/2401)) - `RecvMsg::cmsgs()` now returns a `Result`, and checks that cmsgs were not truncated. ([#&#8203;2413](https://github.com/nix-rust/nix/pull/2413)) ##### Fixed - No longer panics when the `fanotify` queue overflows. ([#&#8203;2399](https://github.com/nix-rust/nix/pull/2399)) - Fixed ControlMessageOwned::UdpGroSegments wrapped type from u16 to i32 to reflect the used kernel's one. ([#&#8203;2406](https://github.com/nix-rust/nix/pull/2406)) #### \[0.28.0] - 2024-02-24 ##### Added - Added `mkdtemp` wrapper ([#&#8203;1297](https://github.com/nix-rust/nix/pull/1297)) - Add associated constants `UTIME_OMIT` `UTIME_NOW` for `TimeSpec` ([#&#8203;1879](https://github.com/nix-rust/nix/pull/1879)) - Added `EventFd` type. ([#&#8203;1945](https://github.com/nix-rust/nix/pull/1945)) - - Added `impl From<Signal> for SigSet`. - Added `impl std::ops::BitOr for SigSet`. - Added `impl std::ops::BitOr for Signal`. - Added `impl std::ops::BitOr<Signal> for SigSet` ([#&#8203;1959](https://github.com/nix-rust/nix/pull/1959)) - Added `TlsGetRecordType` control message type and corresponding enum for linux ([#&#8203;2065](https://github.com/nix-rust/nix/pull/2065)) - Added `Ipv6HopLimit` to `::nix::sys::socket::ControlMessage` for Linux, MacOS, FreeBSD, DragonflyBSD, Android, iOS and Haiku. ([#&#8203;2074](https://github.com/nix-rust/nix/pull/2074)) - Added `Icmp` and `IcmpV6` to `SockProtocol` ([#&#8203;2103](https://github.com/nix-rust/nix/pull/2103)) - Added rfork support for FreeBSD in `unistd` ([#&#8203;2121](https://github.com/nix-rust/nix/pull/2121)) - Added `MapFlags::map_hugetlb_with_size_log2` method for Linux targets ([#&#8203;2125](https://github.com/nix-rust/nix/pull/2125)) - Added `mmap_anonymous` function ([#&#8203;2127](https://github.com/nix-rust/nix/pull/2127)) - Added `mips32r6` and `mips64r6` support for signal, ioctl and ptrace ([#&#8203;2138](https://github.com/nix-rust/nix/pull/2138)) - Added `F_GETPATH` FcntlFlags entry on Apple/NetBSD/DragonflyBSD for `::nix::fcntl`. ([#&#8203;2142](https://github.com/nix-rust/nix/pull/2142)) - Added `F_KINFO` FcntlFlags entry on FreeBSD for `::nix::fcntl`. ([#&#8203;2152](https://github.com/nix-rust/nix/pull/2152)) - Added `F_GETPATH_NOFIRMLINK` and `F_BARRIERFSYNC` FcntlFlags entry on Apple for `::nix::fcntl`. ([#&#8203;2155](https://github.com/nix-rust/nix/pull/2155)) - Added newtype `Flock` to automatically unlock a held flock upon drop. Added `Flockable` trait to represent valid types for `Flock`. ([#&#8203;2170](https://github.com/nix-rust/nix/pull/2170)) - Added `SetSockOpt` impls to enable Linux Kernel TLS on a TCP socket and to import TLS parameters. ([#&#8203;2175](https://github.com/nix-rust/nix/pull/2175)) - - Added the `::nix::sys::socket::SocketTimestamp` enum for configuring the `TsClock` (a.k.a `SO_TS_CLOCK`) sockopt - Added FreeBSD's `ScmRealtime` and `ScmMonotonic` as new options in `::nix::sys::socket::ControlMessageOwned` ([#&#8203;2187](https://github.com/nix-rust/nix/pull/2187)) - Added new fanotify API: wrappers for `fanotify_init` and `fanotify_mark` ([#&#8203;2194](https://github.com/nix-rust/nix/pull/2194)) - Added `SpecialCharacterindices` support for haiku. ([#&#8203;2195](https://github.com/nix-rust/nix/pull/2195)) - Added `sys::sendfile` support for solaris/illumos. ([#&#8203;2198](https://github.com/nix-rust/nix/pull/2198)) - impl Display for InterfaceFlags ([#&#8203;2206](https://github.com/nix-rust/nix/pull/2206)) - Added `sendfilev` in sys::sendfile for solarish ([#&#8203;2207](https://github.com/nix-rust/nix/pull/2207)) - Added `fctrl::SealFlag::F_SEAL_FUTURE_WRITE` ([#&#8203;2213](https://github.com/nix-rust/nix/pull/2213)) - Added `Ipv6MulticastHops` as socket option to set and read. ([#&#8203;2234](https://github.com/nix-rust/nix/pull/2234)) - Enable `ControlMessageOwned::Ipv4RecvIf` and `ControlMessageOwned::Ipv4RecvDstAddr` for DragonFlyBSD ([#&#8203;2240](https://github.com/nix-rust/nix/pull/2240)) - `ClockId::set_time()` and `time::clock_settime()` are now enabled on macOS ([#&#8203;2241](https://github.com/nix-rust/nix/pull/2241)) - Added `IpBindAddressNoPort` sockopt to support `IP_BIND_ADDRESS_NO_PORT` available on linux. ([#&#8203;2244](https://github.com/nix-rust/nix/pull/2244)) - Enable `MapFlags::map_hugetlb_with_size_log2` method for Android/Fuchsia ([#&#8203;2245](https://github.com/nix-rust/nix/pull/2245)) - Added `TcpFastOpenConnect` sockopt to support `TCP_FASTOPEN_CONNECT` available on linux. ([#&#8203;2247](https://github.com/nix-rust/nix/pull/2247)) - Add `reboot(2)` for OpenBSD/NetBSD ([#&#8203;2251](https://github.com/nix-rust/nix/pull/2251)) - Added new `MemFdCreateFlag` constants to `sys::memfd` on Linux and Android related to hugetlbfs support. ([#&#8203;2252](https://github.com/nix-rust/nix/pull/2252)) - Expose the inner fd of `Kqueue` through: - impl AsFd for Kqueue - impl From\<Kqueue> for OwnedFd ([#&#8203;2258](https://github.com/nix-rust/nix/pull/2258)) - Added `sys::eventfd` support on FreeBSD ([#&#8203;2259](https://github.com/nix-rust/nix/pull/2259)) - Added `MmapFlags::MAP_FIXED` constant in `sys::mman` for netbsd and openbsd ([#&#8203;2260](https://github.com/nix-rust/nix/pull/2260)) - Added the `SO_LISTENQLIMIT` sockopt. ([#&#8203;2263](https://github.com/nix-rust/nix/pull/2263)) - Enable the `AT_EMPTY_PATH` flag for the `fchownat()` function ([#&#8203;2267](https://github.com/nix-rust/nix/pull/2267)) - Add `AtFlags::AT_EMPTY_PATH` for FreeBSD and Hurd ([#&#8203;2270](https://github.com/nix-rust/nix/pull/2270)) - Enable \`OFlag::O\_DIRECTORY for Solarish ([#&#8203;2275](https://github.com/nix-rust/nix/pull/2275)) - Added the `Backlog` wrapper type for the `listen` call. ([#&#8203;2276](https://github.com/nix-rust/nix/pull/2276)) - Add `clock_nanosleep()` ([#&#8203;2277](https://github.com/nix-rust/nix/pull/2277)) - Enabled `O_DIRECT` in `fcntl::OFlags` for solarish ([#&#8203;2278](https://github.com/nix-rust/nix/pull/2278)) - Added a new API sigsuspend. ([#&#8203;2279](https://github.com/nix-rust/nix/pull/2279)) - - Added `errno::Errno::set` function - Added `errno::Errno::set_raw` function - Added `errno::Errno::last_raw` function - Added `errno::Errno::from_raw` function ([#&#8203;2283](https://github.com/nix-rust/nix/pull/2283)) - Enable the `AT_EMPTY_PATH` flag for the `linkat()` function ([#&#8203;2284](https://github.com/nix-rust/nix/pull/2284)) - Enable unistd::{sync, syncfs} for Android ([#&#8203;2296](https://github.com/nix-rust/nix/pull/2296)) ##### Changed - `poll` now takes `PollTimeout` replacing `libc::c_int`. ([#&#8203;1876](https://github.com/nix-rust/nix/pull/1876)) - Deprecated `sys::eventfd::eventfd`. ([#&#8203;1945](https://github.com/nix-rust/nix/pull/1945)) - `mmap`, `mmap_anonymous`, `munmap`, `mremap`, `madvise`, `msync`, `mprotect`, `munlock` and `mlock` updated to use `NonNull`. ([#&#8203;2000](https://github.com/nix-rust/nix/pull/2000)) - `mmap` function now accepts `F` instead of `Option<F>` ([#&#8203;2127](https://github.com/nix-rust/nix/pull/2127)) - `PollFd::new` now takes a `BorrowedFd` argument, with relaxed lifetime requirements relative to the previous version. ([#&#8203;2134](https://github.com/nix-rust/nix/pull/2134)) - `FdSet::{insert, remove, contains}` now take `BorrowedFd` arguments, and have relaxed lifetime requirements relative to 0.27.1. ([#&#8203;2136](https://github.com/nix-rust/nix/pull/2136)) - The following APIs now take an implementation of `AsFd` rather than a `RawFd`: - `unistd::tcgetpgrp` - `unistd::tcsetpgrp` - `unistd::fpathconf` - `unistd::ttyname` - `unistd::getpeereid` ([#&#8203;2137](https://github.com/nix-rust/nix/pull/2137)) - Changed `openat()` and `Dir::openat()`, now take optional `dirfd`s ([#&#8203;2139](https://github.com/nix-rust/nix/pull/2139)) - The MSRV is now 1.69 ([#&#8203;2144](https://github.com/nix-rust/nix/pull/2144)) - Changed function `SockaddrIn::ip()` to return `net::Ipv4Addr` and refactored `SocketAddrV6::ip()` to be `const` ([#&#8203;2151](https://github.com/nix-rust/nix/pull/2151)) - The following APIs now take optional `dirfd`s: - `readlinkat()` - `fstatat()` - `mknodat()` - `mkdirat()` - `execveat()` ([#&#8203;2157](https://github.com/nix-rust/nix/pull/2157)) - `Epoll::wait` now takes `EpollTimeout` replacing `isize`. ([#&#8203;2202](https://github.com/nix-rust/nix/pull/2202)) - - Deprecated `errno::errno()` function (use `Errno::last_raw()`) - Deprecated `errno::from_i32()` function (use `Errno::from_raw()`) - Deprecated `errno::Errno::from_i32()` function (use `Errno::from_raw()`) ([#&#8203;2283](https://github.com/nix-rust/nix/pull/2283)) ##### Fixed - Fix `SigSet` incorrect implementation of `Eq`, `PartialEq` and `Hash` ([#&#8203;1946](https://github.com/nix-rust/nix/pull/1946)) - Fixed `::sys::socket::sockopt::IpMulticastTtl` by fixing the value of optlen passed to `libc::setsockopt` and added tests. ([#&#8203;2072](https://github.com/nix-rust/nix/pull/2072)) - Fixed the function signature of `recvmmsg`, potentially causing UB ([#&#8203;2119](https://github.com/nix-rust/nix/pull/2119)) - Fix `SignalFd::set_mask`. In 0.27.0 it would actually close the file descriptor. ([#&#8203;2141](https://github.com/nix-rust/nix/pull/2141)) - Fixed UnixAddr::new for haiku, it did not record the `sun_len` value as needed. Fixed `sys::socket::addr::from_raw_parts` and `sys::socket::Sockaddrlike::len` build for solaris. ([#&#8203;2242](https://github.com/nix-rust/nix/pull/2242)) - Fixed solaris build globally. ([#&#8203;2248](https://github.com/nix-rust/nix/pull/2248)) - Changed the `dup3` wrapper to perform a real call to `dup3` instead of emulating it via `dup2` and `fcntl` to get rid of race condition ([#&#8203;2268](https://github.com/nix-rust/nix/pull/2268)) - Fixed `::unistd::Group::members` using read\_unaligned to avoid crash on misaligned pointers ([#&#8203;2311](https://github.com/nix-rust/nix/pull/2311)) ##### Removed - The `FchownatFlags` type has been deprecated, please use `AtFlags` instead. ([#&#8203;2267](https://github.com/nix-rust/nix/pull/2267)) - Removed the `dup3` wrapper on macOS, which was emulated via `dup2` and `fcntl` and could cause a race condition. The `dup3` system call is not supported on macOS. ([#&#8203;2268](https://github.com/nix-rust/nix/pull/2268)) - The `LinkatFlags` type has been deprecated, please use `AtFlags` instead. ([#&#8203;2284](https://github.com/nix-rust/nix/pull/2284)) #### \[0.27.1] - 2023-08-28 ##### Fixed - Fixed generating the documentation on docs.rs. ([#&#8203;2111](https://github.com/nix-rust/nix/pull/2111)) #### \[0.27.0] - 2023-08-28 ##### Added - Added `AT_EACCESS` to `AtFlags` on all platforms but android ([#&#8203;1995](https://github.com/nix-rust/nix/pull/1995)) - Add `PF_ROUTE` to `SockType` on macOS, iOS, all of the BSDs, Fuchsia, Haiku, Illumos. ([#&#8203;1867](https://github.com/nix-rust/nix/pull/1867)) - Added `nix::ucontext` module on `aarch64-unknown-linux-gnu`. (#[1662](https://github.com/nix-rust/nix/pull/1662)) - Added `CanRaw` to `SockProtocol` and `CanBcm` as a separate `SocProtocol` constant. ([#&#8203;1912](https://github.com/nix-rust/nix/pull/1912)) - Added `Generic` and `NFLOG` to `SockProtocol`. ([#&#8203;2092](https://github.com/nix-rust/nix/pull/2092)) - Added `mq_timedreceive` to `::nix::mqueue`. (\[[#&#8203;1966](https://github.com/nix-rust/nix/issues/1966)])([#&#8203;1966](https://github.com/nix-rust/nix/pull/1966)) - Added `LocalPeerPid` to `nix::sys::socket::sockopt` for macOS. ([#&#8203;1967](https://github.com/nix-rust/nix/pull/1967)) - Added `TFD_TIMER_CANCEL_ON_SET` to `::nix::sys::time::TimerSetTimeFlags` on Linux and Android. ([#&#8203;2040](https://github.com/nix-rust/nix/pull/2040)) - Added `SOF_TIMESTAMPING_OPT_ID` and `SOF_TIMESTAMPING_OPT_TSONLY` to `nix::sys::socket::TimestampingFlag`. ([#&#8203;2048](https://github.com/nix-rust/nix/pull/2048)) - Enabled socket timestamping options on Android. ([#&#8203;2077](https://github.com/nix-rust/nix/pull/2077)) - Added vsock support for macOS ([#&#8203;2056](https://github.com/nix-rust/nix/pull/2056)) - Added `SO_SETFIB` and `SO_USER_COOKIE` to `nix::sys::socket::sockopt` for FreeBSD. ([#&#8203;2085](https://github.com/nix-rust/nix/pull/2085)) - Added `SO_RTABLE` for OpenBSD and `SO_ACCEPTFILTER` for FreeBSD/NetBSD to `nix::sys::socket::sockopt`. ([#&#8203;2085](https://github.com/nix-rust/nix/pull/2085)) - Added `MSG_WAITFORONE` to `MsgFlags` on Android, Fuchsia, Linux, NetBSD, FreeBSD, OpenBSD, and Solaris. ([#&#8203;2014](https://github.com/nix-rust/nix/pull/2014)) - Added `SO_TS_CLOCK` for FreeBSD to `nix::sys::socket::sockopt`. ([#&#8203;2093](https://github.com/nix-rust/nix/pull/2093)) - Added support for prctl in Linux. (#[1550](https://github.com/nix-rust/nix/pull/1550)) - `nix::socket` and `nix::select` are now available on Redox. ([#&#8203;2012](https://github.com/nix-rust/nix/pull/2012)) - Implemented AsFd, AsRawFd, FromRawFd, and IntoRawFd for `mqueue::MqdT`. ([#&#8203;2097](https://github.com/nix-rust/nix/pull/2097)) - Add the ability to set `kevent_flags` on `SigEvent`. ([#&#8203;1731](https://github.com/nix-rust/nix/pull/1731)) ##### Changed - All Cargo features have been removed from the default set. Users will need to specify which features they depend on in their Cargo.toml. ([#&#8203;2091](https://github.com/nix-rust/nix/pull/2091)) - Implemented I/O safety for many, but not all, of Nix's APIs. Many public functions argument and return types have changed: | Original Type | New Type | | ------------- | --------------------- | | AsRawFd | AsFd | | RawFd | BorrowedFd or OwnedFd | (#[1906](https://github.com/nix-rust/nix/pull/1906)) - Use I/O safety with `copy_file_range`, and expose it on FreeBSD. (#[1906](https://github.com/nix-rust/nix/pull/1906)) - The MSRV is now 1.65 ([#&#8203;1862](https://github.com/nix-rust/nix/pull/1862)) ([#&#8203;2104](https://github.com/nix-rust/nix/pull/2104)) - The epoll interface now uses a type. ([#&#8203;1882](https://github.com/nix-rust/nix/pull/1882)) - With I/O-safe type applied in `pty::OpenptyResult` and `pty::ForkptyResult`, users no longer need to manually close the file descriptors in these types. ([#&#8203;1921](https://github.com/nix-rust/nix/pull/1921)) - Refactored `name` parameter of `mq_open` and `mq_unlink` to be generic over `NixPath`. ([#&#8203;2102](https://github.com/nix-rust/nix/pull/2102)). - Made `clone` unsafe, like `fork`. ([#&#8203;1993](https://github.com/nix-rust/nix/pull/1993)) ##### Removed - `sys::event::{kevent, kevent_ts}` are deprecated in favor of `sys::kevent::Kqueue::kevent`, and `sys::event::kqueue` is deprecated in favor of `sys::kevent::Kqueue::new`. ([#&#8203;1943](https://github.com/nix-rust/nix/pull/1943)) - Removed deprecated IoVec API. ([#&#8203;1855](https://github.com/nix-rust/nix/pull/1855)) - Removed deprecated net APIs. ([#&#8203;1861](https://github.com/nix-rust/nix/pull/1861)) - `nix::sys::signalfd::signalfd` is deprecated. Use `nix::sys::signalfd::SignalFd` instead. ([#&#8203;1938](https://github.com/nix-rust/nix/pull/1938)) - Removed `SigEvent` support on Fuchsia, where it was unsound. ([#&#8203;2079](https://github.com/nix-rust/nix/pull/2079)) - Removed `flock` from `::nix::fcntl` on Solaris. ([#&#8203;2082](https://github.com/nix-rust/nix/pull/2082)) #### \[0.26.3] - 2023-08-27 ##### Fixed - Fix: send `ETH_P_ALL` in htons format ([#&#8203;1925](https://github.com/nix-rust/nix/pull/1925)) - Fix: `recvmsg` now sets the length of the received `sockaddr_un` field correctly on Linux platforms. ([#&#8203;2041](https://github.com/nix-rust/nix/pull/2041)) - Fix potentially invalid conversions in `SockaddrIn::from<std::net::SocketAddrV4>`, `SockaddrIn6::from<std::net::SockaddrV6>`, `IpMembershipRequest::new`, and `Ipv6MembershipRequest::new` with future Rust versions. ([#&#8203;2061](https://github.com/nix-rust/nix/pull/2061)) - Fixed an incorrect lifetime returned from `recvmsg`. ([#&#8203;2095](https://github.com/nix-rust/nix/pull/2095)) #### \[0.26.2] - 2023-01-18 ##### Fixed - Fix `SockaddrIn6` bug that was swapping `flowinfo` and `scope_id` byte ordering. ([#&#8203;1964](https://github.com/nix-rust/nix/pull/1964)) #### \[0.26.1] - 2022-11-29 ##### Fixed - Fix UB with `sys::socket::sockopt::SockType` using `SOCK_PACKET`. ([#&#8203;1821](https://github.com/nix-rust/nix/pull/1821)) #### \[0.26.0] - 2022-11-29 ##### Added - Added `SockaddrStorage::{as_unix_addr, as_unix_addr_mut}` ([#&#8203;1871](https://github.com/nix-rust/nix/pull/1871)) - Added `MntFlags` and `unmount` on all of the BSDs. - Added `any()` and `all()` to `poll::PollFd`. ([#&#8203;1877](https://github.com/nix-rust/nix/pull/1877)) - Add `MntFlags` and `unmount` on all of the BSDs. ([#&#8203;1849](https://github.com/nix-rust/nix/pull/1849)) - Added a `Statfs::flags` method. ([#&#8203;1849](https://github.com/nix-rust/nix/pull/1849)) - Added `NSFS_MAGIC` FsType on Linux and Android. ([#&#8203;1829](https://github.com/nix-rust/nix/pull/1829)) - Added `sched_getcpu` on platforms that support it. ([#&#8203;1825](https://github.com/nix-rust/nix/pull/1825)) - Added `sched_getaffinity` and `sched_setaffinity` on FreeBSD. ([#&#8203;1804](https://github.com/nix-rust/nix/pull/1804)) - Added `line_discipline` field to `Termios` on Linux, Android and Haiku ([#&#8203;1805](https://github.com/nix-rust/nix/pull/1805)) - Expose the memfd module on FreeBSD (memfd was added in FreeBSD 13) ([#&#8203;1808](https://github.com/nix-rust/nix/pull/1808)) - Added `domainname` field of `UtsName` on Android and Linux ([#&#8203;1817](https://github.com/nix-rust/nix/pull/1817)) - Re-export `RLIM_INFINITY` from `libc` ([#&#8203;1831](https://github.com/nix-rust/nix/pull/1831)) - Added `syncfs(2)` on Linux ([#&#8203;1833](https://github.com/nix-rust/nix/pull/1833)) - Added `faccessat(2)` on illumos ([#&#8203;1841](https://github.com/nix-rust/nix/pull/1841)) - Added `eaccess()` on FreeBSD, DragonFly and Linux (glibc and musl). ([#&#8203;1842](https://github.com/nix-rust/nix/pull/1842)) - Added `IP_TOS` `SO_PRIORITY` and `IPV6_TCLASS` sockopts for Linux ([#&#8203;1853](https://github.com/nix-rust/nix/pull/1853)) - Added `new_unnamed` and `is_unnamed` for `UnixAddr` on Linux and Android. ([#&#8203;1857](https://github.com/nix-rust/nix/pull/1857)) - Added `SockProtocol::Raw` for raw sockets ([#&#8203;1848](https://github.com/nix-rust/nix/pull/1848)) - added `IP_MTU` (`IpMtu`) `IPPROTO_IP` sockopt on Linux and Android. ([#&#8203;1865](https://github.com/nix-rust/nix/pull/1865)) ##### Changed - The MSRV is now 1.56.1 ([#&#8203;1792](https://github.com/nix-rust/nix/pull/1792)) - The `addr` argument of `sys::mman::mmap` is now of type `Option<NonZeroUsize>`. ([#&#8203;1870](https://github.com/nix-rust/nix/pull/1870)) - The `length` argument of `sys::mman::mmap` is now of type `NonZeroUsize`. ([#&#8203;1873](https://github.com/nix-rust/nix/pull/1873)) ##### Fixed - Fixed using `SockaddrStorage` to store a Unix-domain socket address on Linux. ([#&#8203;1871](https://github.com/nix-rust/nix/pull/1871)) - Fix microsecond calculation for `TimeSpec`. ([#&#8203;1801](https://github.com/nix-rust/nix/pull/1801)) - Fix `User::from_name` and `Group::from_name` panicking when given a name containing a nul. ([#&#8203;1815](https://github.com/nix-rust/nix/pull/1815)) - Fix `User::from_uid` and `User::from_name` crash on Android platform. ([#&#8203;1824](https://github.com/nix-rust/nix/pull/1824)) - Workaround XNU bug causing netmasks returned by `getifaddrs` to misbehave. ([#&#8203;1788](https://github.com/nix-rust/nix/pull/1788)) ##### Removed - Removed deprecated error constants and conversions. ([#&#8203;1860](https://github.com/nix-rust/nix/pull/1860)) #### \[0.25.0] - 2022-08-13 ##### Added - Added `faccessat` ([#&#8203;1780](https://github.com/nix-rust/nix/pull/1780)) - Added `memfd` on Android. (#[1773](https://github.com/nix-rust/nix/pull/1773)) - Added `ETH_P_ALL` to `SockProtocol` enum (#[1768](https://github.com/nix-rust/nix/pull/1768)) - Added four non-standard Linux `SysconfVar` variants (#[1761](https://github.com/nix-rust/nix/pull/1761)) - Added const constructors for `TimeSpec` and `TimeVal` (#[1760](https://github.com/nix-rust/nix/pull/1760)) - Added `chflags`. (#[1758](https://github.com/nix-rust/nix/pull/1758)) - Added `aio_writev` and `aio_readv`. (#[1713](https://github.com/nix-rust/nix/pull/1713)) - impl `From<uid_t>` for `Uid` and `From<gid_t>` for `Gid` (#[1727](https://github.com/nix-rust/nix/pull/1727)) - impl `From<SockaddrIn>` for `std::net::SocketAddrV4` and impl `From<SockaddrIn6>` for `std::net::SocketAddrV6`. (#[1711](https://github.com/nix-rust/nix/pull/1711)) - Added support for the `x86_64-unknown-haiku` target. (#[1703](https://github.com/nix-rust/nix/pull/1703)) - Added `ptrace::read_user` and `ptrace::write_user` for Linux. (#[1697](https://github.com/nix-rust/nix/pull/1697)) - Added `getrusage` and helper types `UsageWho` and `Usage` (#[1747](https://github.com/nix-rust/nix/pull/1747)) - Added the `DontRoute` SockOpt (#[1752](https://github.com/nix-rust/nix/pull/1752)) - Added `signal::SigSet::from_sigset_t_unchecked()`. (#[1741](https://github.com/nix-rust/nix/pull/1741)) - Added the `Ipv4OrigDstAddr` sockopt and control message. (#[1772](https://github.com/nix-rust/nix/pull/1772)) - Added the `Ipv6OrigDstAddr` sockopt and control message. (#[1772](https://github.com/nix-rust/nix/pull/1772)) - Added the `Ipv4SendSrcAddr` control message. (#[1776](https://github.com/nix-rust/nix/pull/1776)) ##### Changed - Reimplemented sendmmsg/recvmmsg to avoid allocations and with better API (#[1744](https://github.com/nix-rust/nix/pull/1744)) - Rewrote the aio module. The new module: - Does more type checking at compile time rather than runtime. - Gives the caller control over whether and when to `Box` an aio operation. - Changes the type of the `priority` arguments to `i32`. - Changes the return type of `aio_return` to `usize`. (#[1713](https://github.com/nix-rust/nix/pull/1713)) - `nix::poll::ppoll`: `sigmask` parameter is now optional. (#[1739](https://github.com/nix-rust/nix/pull/1739)) - Changed `gethostname` to return an owned `OsString`. (#[1745](https://github.com/nix-rust/nix/pull/1745)) - `signal:SigSet` is now marked as `repr(transparent)`. (#[1741](https://github.com/nix-rust/nix/pull/1741)) ##### Removed - Removed support for resubmitting partially complete `lio_listio` operations. It was too complicated, and didn't fit Nix's theme of zero-cost abstractions. Instead, it can be reimplemented downstream. (#[1713](https://github.com/nix-rust/nix/pull/1713)) #### \[0.24.2] - 2022-07-17 ##### Fixed - Fixed buffer overflow in `nix::sys::socket::recvfrom`. (#[1763](https://github.com/nix-rust/nix/pull/1763)) - Enabled `SockaddrStorage::{as_link_addr, as_link_addr_mut}` for Linux-like operating systems. (#[1729](https://github.com/nix-rust/nix/pull/1729)) - Fixed `SockaddrLike::from_raw` implementations for `VsockAddr` and `SysControlAddr`. (#[1736](https://github.com/nix-rust/nix/pull/1736)) #### \[0.24.1] - 2022-04-22 ##### Fixed - Fixed `UnixAddr::size` on Linux-based OSes. (#[1702](https://github.com/nix-rust/nix/pull/1702)) #### \[0.24.0] - 2022-04-21 ##### Added - Added fine-grained features flags. Most Nix functionality can now be conditionally enabled. By default, all features are enabled. (#[1611](https://github.com/nix-rust/nix/pull/1611)) - Added statfs FS type magic constants for `target_os = "android"` and synced constants with libc v0.2.121. (#[1690](https://github.com/nix-rust/nix/pull/1690)) - Added `fexecve` on DragonFly. (#[1577](https://github.com/nix-rust/nix/pull/1577)) - `sys::uio::IoVec` is now `Send` and `Sync` (#[1582](https://github.com/nix-rust/nix/pull/1582)) - Added `EPOLLEXCLUSIVE` on Android. (#[1567](https://github.com/nix-rust/nix/pull/1567)) - Added `fdatasync` for FreeBSD, Fuchsia, NetBSD, and OpenBSD. (#[1581](https://github.com/nix-rust/nix/pull/1581)) - Added `sched_setaffinity` and `sched_getaffinity` on DragonFly. (#[1537](https://github.com/nix-rust/nix/pull/1537)) - Added `posix_fallocate` on DragonFly. (#[1621](https://github.com/nix-rust/nix/pull/1621)) - Added `SO_TIMESTAMPING` support (#[1547](https://github.com/nix-rust/nix/pull/1547)) - Added getter methods to `MqAttr` struct (#[1619](https://github.com/nix-rust/nix/pull/1619)) - Added the `TxTime` sockopt and control message. (#[1564](https://github.com/nix-rust/nix/pull/1564)) - Added POSIX per-process timer support (#[1622](https://github.com/nix-rust/nix/pull/1622)) - Added `sendfile` on DragonFly. (#[1615](https://github.com/nix-rust/nix/pull/1615)) - Added `UMOUNT_NOFOLLOW`, `FUSE_SUPER_MAGIC` on Linux. (#[1634](https://github.com/nix-rust/nix/pull/1634)) - Added `getresuid`, `setresuid`, `getresgid`, and `setresgid` on DragonFly, FreeBSD, and OpenBSD. (#[1628](https://github.com/nix-rust/nix/pull/1628)) - Added `MAP_FIXED_NOREPLACE` on Linux. (#[1636](https://github.com/nix-rust/nix/pull/1636)) - Added `fspacectl` on FreeBSD (#[1640](https://github.com/nix-rust/nix/pull/1640)) - Added `accept4` on DragonFly, Emscripten, Fuchsia, Illumos, and NetBSD. (#[1654](https://github.com/nix-rust/nix/pull/1654)) - Added `AsRawFd` implementation on `OwningIter`. (#[1563](https://github.com/nix-rust/nix/pull/1563)) - Added `process_vm_readv` and `process_vm_writev` on Android. (#[1557](https://github.com/nix-rust/nix/pull/1557)) - Added `nix::ucontext` module on s390x. (#[1662](https://github.com/nix-rust/nix/pull/1662)) - Implemented `Extend`, `FromIterator`, and `IntoIterator` for `SigSet` and added `SigSet::iter` and `SigSetIter`. (#[1553](https://github.com/nix-rust/nix/pull/1553)) - Added `ENOTRECOVERABLE` and `EOWNERDEAD` error codes on DragonFly. (#[1665](https://github.com/nix-rust/nix/pull/1665)) - Implemented `Read` and `Write` for `&PtyMaster` (#[1664](https://github.com/nix-rust/nix/pull/1664)) - Added `MSG_NOSIGNAL` for Android, Dragonfly, FreeBSD, Fuchsia, Haiku, Illumos, Linux, NetBSD, OpenBSD and Solaris. (#[1670](https://github.com/nix-rust/nix/pull/1670)) - Added `waitid`. (#[1584](https://github.com/nix-rust/nix/pull/1584)) - Added `Ipv6DontFrag` for android, iOS, linux and macOS. - Added `IpDontFrag` for iOS, macOS. (#[1692](https://github.com/nix-rust/nix/pull/1692)) ##### Changed - `mqueue` functions now operate on a distinct type, `nix::mqueue::MqdT`. Accessors take this type by reference, not by value. (#[1639](https://github.com/nix-rust/nix/pull/1639)) - Removed `SigSet::extend` in favor of `<SigSet as Extend<Signal>>::extend`. Because of this change, you now need `use std::iter::Extend` to call `extend` on a `SigSet`. (#[1553](https://github.com/nix-rust/nix/pull/1553)) - Removed the the `PATH_MAX` restriction from APIs accepting paths. Paths will now be allocated on the heap if they are too long. In addition, large instruction count improvements (\~30x) were made to path handling. (#[1656](https://github.com/nix-rust/nix/pull/1656)) - Changed `getrlimit` and `setrlimit` to use `rlim_t` directly instead of `Option<rlim_t>`. (#[1668](https://github.com/nix-rust/nix/pull/1668)) - Deprecated `InetAddr` and `SockAddr` in favor of `SockaddrIn`, `SockaddrIn6`, and `SockaddrStorage`. (#[1684](https://github.com/nix-rust/nix/pull/1684)) - Deprecated `IpAddr`, `Ipv4Addr`, and `Ipv6Addr` in favor of their equivalents from the standard library. (#[1685](https://github.com/nix-rust/nix/pull/1685)) - `uname` now returns a `Result<UtsName>` instead of just a `UtsName` and ignoring failures from libc. And getters on the `UtsName` struct now return an `&OsStr` instead of `&str`. (#[1672](https://github.com/nix-rust/nix/pull/1672)) - Replaced `IoVec` with `IoSlice` and `IoSliceMut`, and replaced `IoVec::from_slice` with `IoSlice::new`. (#[1643](https://github.com/nix-rust/nix/pull/1643)) ##### Fixed - `InetAddr::from_std` now sets the `sin_len`/`sin6_len` fields on the BSDs. (#[1642](https://github.com/nix-rust/nix/pull/1642)) - Fixed a panic in `LinkAddr::addr`. That function now returns an `Option`. (#[1675](https://github.com/nix-rust/nix/pull/1675)) (#[1677](https://github.com/nix-rust/nix/pull/1677)) ##### Removed - Removed public access to the inner fields of `NetlinkAddr`, `AlgAddr`, `SysControlAddr`, `LinkAddr`, and `VsockAddr`. (#[1614](https://github.com/nix-rust/nix/pull/1614)) - Removed `EventFlag::EV_SYSFLAG`. (#[1635](https://github.com/nix-rust/nix/pull/1635)) #### \[0.23.1] - 2021-12-16 ##### Changed - Relaxed the bitflags requirement from 1.3.1 to 1.1. This partially reverts [#&#8203;1492](https://github.com/nix-rust/nix/issues/1492). From now on, the MSRV is not guaranteed to work with all versions of all dependencies, just with some version of all dependencies. (#[1607](https://github.com/nix-rust/nix/pull/1607)) ##### Fixed - Fixed soundness issues in `FdSet::insert`, `FdSet::remove`, and `FdSet::contains` involving file descriptors outside of the range `0..FD_SETSIZE`. (#[1575](https://github.com/nix-rust/nix/pull/1575)) #### \[0.23.0] - 2021-09-28 ##### Added - Added the `LocalPeerCred` sockopt. (#[1482](https://github.com/nix-rust/nix/pull/1482)) - Added `TimeSpec::from_duration` and `TimeSpec::from_timespec` (#[1465](https://github.com/nix-rust/nix/pull/1465)) - Added `IPV6_V6ONLY` sockopt. (#[1470](https://github.com/nix-rust/nix/pull/1470)) - Added `impl From<User> for libc::passwd` trait implementation to convert a `User` into a `libc::passwd`. Consumes the `User` struct to give ownership over the member pointers. (#[1471](https://github.com/nix-rust/nix/pull/1471)) - Added `pthread_kill`. (#[1472](https://github.com/nix-rust/nix/pull/1472)) - Added `mknodat`. (#[1473](https://github.com/nix-rust/nix/pull/1473)) - Added `setrlimit` and `getrlimit`. (#[1302](https://github.com/nix-rust/nix/pull/1302)) - Added `ptrace::interrupt` method for platforms that support `PTRACE_INTERRUPT` (#[1422](https://github.com/nix-rust/nix/pull/1422)) - Added `IP6T_SO_ORIGINAL_DST` sockopt. (#[1490](https://github.com/nix-rust/nix/pull/1490)) - Added the `PTRACE_EVENT_STOP` variant to the `sys::ptrace::Event` enum (#[1335](https://github.com/nix-rust/nix/pull/1335)) - Exposed `SockAddr::from_raw_sockaddr` (#[1447](https://github.com/nix-rust/nix/pull/1447)) - Added `TcpRepair` (#[1503](https://github.com/nix-rust/nix/pull/1503)) - Enabled `pwritev` and `preadv` for more operating systems. (#[1511](https://github.com/nix-rust/nix/pull/1511)) - Added support for `TCP_MAXSEG` TCP Maximum Segment Size socket options (#[1292](https://github.com/nix-rust/nix/pull/1292)) - Added `Ipv4RecvErr` and `Ipv6RecvErr` sockopts and associated control messages. (#[1514](https://github.com/nix-rust/nix/pull/1514)) - Added `AsRawFd` implementation on `PollFd`. (#[1516](https://github.com/nix-rust/nix/pull/1516)) - Added `Ipv4Ttl` and `Ipv6Ttl` sockopts. (#[1515](https://github.com/nix-rust/nix/pull/1515)) - Added `MAP_EXCL`, `MAP_ALIGNED_SUPER`, and `MAP_CONCEAL` mmap flags, and exposed `MAP_ANONYMOUS` for all operating systems. (#[1522](https://github.com/nix-rust/nix/pull/1522)) (#[1525](https://github.com/nix-rust/nix/pull/1525)) (#[1531](https://github.com/nix-rust/nix/pull/1531)) (#[1534](https://github.com/nix-rust/nix/pull/1534)) - Added read/write accessors for 'events' on `PollFd`. (#[1517](https://github.com/nix-rust/nix/pull/1517)) ##### Changed - `FdSet::{contains, highest, fds}` no longer require a mutable reference. (#[1464](https://github.com/nix-rust/nix/pull/1464)) - `User::gecos` and corresponding `libc::passwd::pw_gecos` are supported on 64-bit Android, change conditional compilation to include the field in 64-bit Android builds (#[1471](https://github.com/nix-rust/nix/pull/1471)) - `eventfd`s are supported on Android, change conditional compilation to include `sys::eventfd::eventfd` and `sys::eventfd::EfdFlags`for Android builds. (#[1481](https://github.com/nix-rust/nix/pull/1481)) - Most enums that come from C, for example `Errno`, are now marked as `#[non_exhaustive]`. (#[1474](https://github.com/nix-rust/nix/pull/1474)) - Many more functions, mostly contructors, are now `const`. (#[1476](https://github.com/nix-rust/nix/pull/1476)) (#[1492](https://github.com/nix-rust/nix/pull/1492)) - `sys::event::KEvent::filter` now returns a `Result` instead of being infalliable. The only cases where it will now return an error are cases where it previously would've had undefined behavior. (#[1484](https://github.com/nix-rust/nix/pull/1484)) - Minimum supported Rust version is now 1.46.0. ([#&#8203;1492](https://github.com/nix-rust/nix/pull/1492)) - Rework `UnixAddr` to encapsulate internals better in order to fix soundness issues. No longer allows creating a `UnixAddr` from a raw `sockaddr_un`. ([#&#8203;1496](https://github.com/nix-rust/nix/pull/1496)) - Raised bitflags to 1.3.0 and the MSRV to 1.46.0. ([#&#8203;1492](https://github.com/nix-rust/nix/pull/1492)) ##### Fixed - `posix_fadvise` now returns errors in the conventional way, rather than as a non-zero value in `Ok()`. (#[1538](https://github.com/nix-rust/nix/pull/1538)) - Added more errno definitions for better backwards compatibility with Nix 0.21.0. (#[1467](https://github.com/nix-rust/nix/pull/1467)) - Fixed potential undefined behavior in `Signal::try_from` on some platforms. (#[1484](https://github.com/nix-rust/nix/pull/1484)) - Fixed buffer overflow in `unistd::getgrouplist`. (#[1545](https://github.com/nix-rust/nix/pull/1545)) ##### Removed - Removed a couple of termios constants on redox that were never actually supported. (#[1483](https://github.com/nix-rust/nix/pull/1483)) - Removed `nix::sys::signal::NSIG`. It was of dubious utility, and not correct for all platforms. (#[1484](https://github.com/nix-rust/nix/pull/1484)) - Removed support for 32-bit Apple targets, since they've been dropped by both Rustc and Xcode. (#[1492](https://github.com/nix-rust/nix/pull/1492)) - Deprecated `SockAddr/InetAddr::to_str` in favor of `ToString::to_string` (#[1495](https://github.com/nix-rust/nix/pull/1495)) - Removed `SigevNotify` on OpenBSD and Redox. (#[1511](https://github.com/nix-rust/nix/pull/1511)) #### \[0.22.3] - 22 January 2022 ##### Changed - Relaxed the bitflags requirement from 1.3.1 to 1.1. This partially reverts [#&#8203;1492](https://github.com/nix-rust/nix/issues/1492). From now on, the MSRV is not guaranteed to work with all versions of all dependencies, just with some version of all dependencies. (#[1607](https://github.com/nix-rust/nix/pull/1607)) #### \[0.22.2] - 28 September 2021 ##### Fixed - Fixed buffer overflow in `unistd::getgrouplist`. (#[1545](https://github.com/nix-rust/nix/pull/1545)) - Added more errno definitions for better backwards compatibility with Nix 0.21.0. (#[1467](https://github.com/nix-rust/nix/pull/1467)) #### \[0.22.1] - 13 August 2021 ##### Fixed - Locked bitflags to < 1.3.0 to fix the build with rust < 1.46.0. ##### Removed - Removed a couple of termios constants on redox that were never actually supported. (#[1483](https://github.com/nix-rust/nix/pull/1483)) #### \[0.22.0] - 9 July 2021 ##### Added - Added `if_nameindex` (#[1445](https://github.com/nix-rust/nix/pull/1445)) - Added `nmount` for FreeBSD. (#[1453](https://github.com/nix-rust/nix/pull/1453)) - Added `IpFreebind` socket option (sockopt) on Linux, Fuchsia and Android. (#[1456](https://github.com/nix-rust/nix/pull/1456)) - Added `TcpUserTimeout` socket option (sockopt) on Linux and Fuchsia. (#[1457](https://github.com/nix-rust/nix/pull/1457)) - Added `renameat2` for Linux (#[1458](https://github.com/nix-rust/nix/pull/1458)) - Added `RxqOvfl` support on Linux, Fuchsia and Android. (#[1455](https://github.com/nix-rust/nix/pull/1455)) ##### Changed - `ptsname_r` now returns a lossily-converted string in the event of bad UTF, just like `ptsname`. ([#&#8203;1446](https://github.com/nix-rust/nix/pull/1446)) - Nix's error type is now a simple wrapper around the platform's Errno. This means it is now `Into<std::io::Error>`. It's also `Clone`, `Copy`, `Eq`, and has a small fixed size. It also requires less typing. For example, the old enum variant `nix::Error::Sys(nix::errno::Errno::EINVAL)` is now simply `nix::Error::EINVAL`. ([#&#8203;1446](https://github.com/nix-rust/nix/pull/1446)) #### \[0.21.2] - 29 September 2021 ##### Fixed - Fixed buffer overflow in `unistd::getgrouplist`. (#[1545](https://github.com/nix-rust/nix/pull/1545)) #### \[0.21.1] - 13 August 2021 ##### Fixed - Locked bitflags to < 1.3.0 to fix the build with rust < 1.46.0. ##### Removed - Removed a couple of termios constants on redox that were never actually supported. (#[1483](https://github.com/nix-rust/nix/pull/1483)) #### \[0.21.0] - 31 May 2021 ##### Added - Added `getresuid` and `getresgid` (#[1430](https://github.com/nix-rust/nix/pull/1430)) - Added TIMESTAMPNS support for linux (#[1402](https://github.com/nix-rust/nix/pull/1402)) - Added `sendfile64` (#[1439](https://github.com/nix-rust/nix/pull/1439)) - Added `MS_LAZYTIME` to `MsFlags` (#[1437](https://github.com/nix-rust/nix/pull/1437)) ##### Changed - Made `forkpty` unsafe, like `fork` (#[1390](https://github.com/nix-rust/nix/pull/1390)) - Made `Uid`, `Gid` and `Pid` methods `from_raw` and `as_raw` a `const fn` (#[1429](https://github.com/nix-rust/nix/pull/1429)) - Made `Uid::is_root` a `const fn` (#[1429](https://github.com/nix-rust/nix/pull/1429)) - `AioCb` is now always pinned. Once a `libc::aiocb` gets sent to the kernel, its address in memory must not change. Nix now enforces that by using `std::pin`. Most users won't need to change anything, except when using `aio_suspend`. See that method's documentation for the new usage. (#[1440](https://github.com/nix-rust/nix/pull/1440)) - `LioCb` is now constructed using a distinct `LioCbBuilder` struct. This avoids a soundness issue with the old `LioCb`. Usage is similar but construction now uses the builder pattern. See the documentation for details. (#[1440](https://github.com/nix-rust/nix/pull/1440)) - Minimum supported Rust version is now 1.41.0. ([#&#8203;1440](https://github.com/nix-rust/nix/pull/1440)) - Errno aliases are now associated consts on `Errno`, instead of consts in the `errno` module. (#[1452](https://github.com/nix-rust/nix/pull/1452)) ##### Fixed - Allow `sockaddr_ll` size, as reported by the Linux kernel, to be smaller then it's definition (#[1395](https://github.com/nix-rust/nix/pull/1395)) - Fix spurious errors using `sendmmsg` with multiple cmsgs (#[1414](https://github.com/nix-rust/nix/pull/1414)) - Added `Errno::EOPNOTSUPP` to FreeBSD, where it was missing. (#[1452](https://github.com/nix-rust/nix/pull/1452)) ##### Removed - Removed `sys::socket::accept4` from Android arm because libc removed it in version 0.2.87. ([#&#8203;1399](https://github.com/nix-rust/nix/pull/1399)) - `AioCb::from_boxed_slice` and `AioCb::from_boxed_mut_slice` have been removed. They were useful with earlier versions of Rust, but should no longer be needed now that async/await are available. `AioCb`s now work exclusively with borrowed buffers, not owned ones. (#[1440](https://github.com/nix-rust/nix/pull/1440)) - Removed some Errno values from platforms where they aren't actually defined. (#[1452](https://github.com/nix-rust/nix/pull/1452)) #### \[0.20.2] - 28 September 2021 ##### Fixed - Fixed buffer overflow in `unistd::getgrouplist`. (#[1545](https://github.com/nix-rust/nix/pull/1545)) #### \[0.20.1] - 13 August 2021 ##### Fixed - Locked bitflags to < 1.3.0 to fix the build with rust < 1.46.0. ##### Removed - Removed a couple of termios constants on redox that were never actually supported. (#[1483](https://github.com/nix-rust/nix/pull/1483)) #### \[0.20.0] - 20 February 2021 ##### Added - Added a `passwd` field to `Group` (#[1338](https://github.com/nix-rust/nix/pull/1338)) - Added `mremap` (#[1306](https://github.com/nix-rust/nix/pull/1306)) - Added `personality` (#[1331](https://github.com/nix-rust/nix/pull/1331)) - Added limited Fuchsia support (#[1285](https://github.com/nix-rust/nix/pull/1285)) - Added `getpeereid` (#[1342](https://github.com/nix-rust/nix/pull/1342)) - Implemented `IntoIterator` for `Dir` (#[1333](https://github.com/nix-rust/nix/pull/1333)). ##### Changed - Minimum supported Rust version is now 1.40.0. ([#&#8203;1356](https://github.com/nix-rust/nix/pull/1356)) - i686-apple-darwin has been demoted to Tier 2 support, because it's deprecated by Xcode. (#[1350](https://github.com/nix-rust/nix/pull/1350)) - Fixed calling `recvfrom` on an `AddrFamily::Packet` socket (#[1344](https://github.com/nix-rust/nix/pull/1344)) ##### Fixed - `TimerFd` now closes the underlying fd on drop. ([#&#8203;1381](https://github.com/nix-rust/nix/pull/1381)) - Define `*_MAGIC` filesystem constants on Linux s390x (#[1372](https://github.com/nix-rust/nix/pull/1372)) - mqueue, sysinfo, timespec, statfs, test\_ptrace\_syscall() on x32 (#[1366](https://github.com/nix-rust/nix/pull/1366)) ##### Removed - `Dir`, `SignalFd`, and `PtyMaster` are no longer `Clone`. (#[1382](https://github.com/nix-rust/nix/pull/1382)) - Removed `SockLevel`, which hasn't been used for a few years (#[1362](https://github.com/nix-rust/nix/pull/1362)) - Removed both `Copy` and `Clone` from `TimerFd`. ([#&#8203;1381](https://github.com/nix-rust/nix/pull/1381)) #### \[0.19.1] - 28 November 2020 ##### Fixed - Fixed bugs in `recvmmsg`. (#[1341](https://github.com/nix-rust/nix/pull/1341)) #### \[0.19.0] - 6 October 2020 ##### Added - Added Netlink protocol families to the `SockProtocol` enum (#[1289](https://github.com/nix-rust/nix/pull/1289)) - Added `clock_gettime`, `clock_settime`, `clock_getres`, `clock_getcpuclockid` functions and `ClockId` struct. (#[1281](https://github.com/nix-rust/nix/pull/1281)) - Added wrapper functions for `PTRACE_SYSEMU` and `PTRACE_SYSEMU_SINGLESTEP`. (#[1300](https://github.com/nix-rust/nix/pull/1300)) - Add support for Vsock on Android rather than just Linux. (#[1301](https://github.com/nix-rust/nix/pull/1301)) - Added `TCP_KEEPCNT` and `TCP_KEEPINTVL` TCP keepalive options. (#[1283](https://github.com/nix-rust/nix/pull/1283)) ##### Changed - Expose `SeekData` and `SeekHole` on all Linux targets (#[1284](https://github.com/nix-rust/nix/pull/1284)) - Changed unistd::{execv,execve,execvp,execvpe,fexecve,execveat} to take both `&[&CStr]` and `&[CString]` as its list argument(s). (#[1278](https://github.com/nix-rust/nix/pull/1278)) - Made `unistd::fork` an unsafe funtion, bringing it in line with [libstd's decision](https://github.com/rust-lang/rust/pull/58059). (#[1293](https://github.com/nix-rust/nix/pull/1293)) #### \[0.18.0] - 26 July 2020 ##### Added - Added `fchown(2)` wrapper. (#[1257](https://github.com/nix-rust/nix/pull/1257)) - Added support on linux systems for `MAP_HUGE_`*`SIZE`* family of flags. (#[1211](https://github.com/nix-rust/nix/pull/1211)) - Added support for `F_OFD_*` `fcntl` commands on Linux and Android. (#[1195](https://github.com/nix-rust/nix/pull/1195)) - Added `env::clearenv()`: calls `libc::clearenv` on platforms where it's available, and clears the environment of all variables via `std::env::vars` and `std::env::remove_var` on others. (#[1185](https://github.com/nix-rust/nix/pull/1185)) - `FsType` inner value made public. (#[1187](https://github.com/nix-rust/nix/pull/1187)) - Added `unistd::setfsuid` and `unistd::setfsgid` to set the user or group identity for filesystem checks per-thread. (#[1163](https://github.com/nix-rust/nix/pull/1163)) - Derived `Ord`, `PartialOrd` for `unistd::Pid` (#[1189](https://github.com/nix-rust/nix/pull/1189)) - Added `select::FdSet::fds` method to iterate over file descriptors in a set. ([#&#8203;1207](https://github.com/nix-rust/nix/pull/1207)) - Added support for UDP generic segmentation offload (GSO) and generic receive offload (GRO) ([#&#8203;1209](https://github.com/nix-rust/nix/pull/1209)) - Added support for `sendmmsg` and `recvmmsg` calls (#[1208](https://github.com/nix-rust/nix/pull/1208)) - Added support for `SCM_CREDS` messages (`UnixCredentials`) on FreeBSD/DragonFly (#[1216](https://github.com/nix-rust/nix/pull/1216)) - Added `BindToDevice` socket option (sockopt) on Linux (#[1233](https://github.com/nix-rust/nix/pull/1233)) - Added `EventFilter` bitflags for `EV_DISPATCH` and `EV_RECEIPT` on OpenBSD. (#[1252](https://github.com/nix-rust/nix/pull/1252)) - Added support for `Ipv4PacketInfo` and `Ipv6PacketInfo` to `ControlMessage`. (#[1222](https://github.com/nix-rust/nix/pull/1222)) - `CpuSet` and `UnixCredentials` now implement `Default`. (#[1244](https://github.com/nix-rust/nix/pull/1244)) - Added `unistd::ttyname` (#[1259](https://github.com/nix-rust/nix/pull/1259)) - Added support for `Ipv4PacketInfo` and `Ipv6PacketInfo` to `ControlMessage` for iOS and Android. (#[1265](https://github.com/nix-rust/nix/pull/1265)) - Added support for `TimerFd`. (#[1261](https://github.com/nix-rust/nix/pull/1261)) ##### Changed - Changed `fallocate` return type from `c_int` to `()` (#[1201](https://github.com/nix-rust/nix/pull/1201)) - Enabled `sys::ptrace::setregs` and `sys::ptrace::getregs` on x86\_64-unknown-linux-musl target (#[1198](https://github.com/nix-rust/nix/pull/1198)) - On Linux, `ptrace::write` is now an `unsafe` function. Caveat programmer. (#[1245](https://github.com/nix-rust/nix/pull/1245)) - `execv`, `execve`, `execvp` and `execveat` in `::nix::unistd` and `reboot` in `::nix::sys::reboot` now return `Result<Infallible>` instead of `Result<Void>` (#[1239](https://github.com/nix-rust/nix/pull/1239)) - `sys::socket::sockaddr_storage_to_addr` is no longer `unsafe`. So is `offset_of!`. - `sys::socket::sockaddr_storage_to_addr`, `offset_of!`, and `Errno::clear` are no longer `unsafe`. - `SockAddr::as_ffi_pair`,`sys::socket::sockaddr_storage_to_addr`, `offset_of!`, and `Errno::clear` are no longer `unsafe`. (#[1244](https://github.com/nix-rust/nix/pull/1244)) - Several `Inotify` methods now take `self` by value instead of by reference (#[1244](https://github.com/nix-rust/nix/pull/1244)) - `nix::poll::ppoll`: `timeout` parameter is now optional, None is equivalent for infinite timeout. ##### Fixed - Fixed `getsockopt`. The old code produced UB which triggers a panic with Rust 1.44.0. (#[1214](https://github.com/nix-rust/nix/pull/1214)) - Fixed a bug in nix::unistd that would result in an infinite loop when a group or user lookup required a buffer larger than 16KB. (#[1198](https://github.com/nix-rust/nix/pull/1198)) - Fixed unaligned casting of `cmsg_data` to `af_alg_iv` (#[1206](https://github.com/nix-rust/nix/pull/1206)) - Fixed `readlink`/`readlinkat` when reading symlinks longer than `PATH_MAX` (#[1231](https://github.com/nix-rust/nix/pull/1231)) - `PollFd`, `EpollEvent`, `IpMembershipRequest`, `Ipv6MembershipRequest`, `TimeVal`, and `IoVec` are now `repr(transparent)`. This is required for correctness's sake across all architectures and compilers, though now bugs have been reported so far. (#[1243](https://github.com/nix-rust/nix/pull/1243)) - Fixed unaligned pointer read in `Inotify::read_events`. (#[1244](https://github.com/nix-rust/nix/pull/1244)) ##### Removed - Removed `sys::socket::addr::from_libc_sockaddr` from the public API. (#[1215](https://github.com/nix-rust/nix/pull/1215)) - Removed `sys::termios::{get_libc_termios, get_libc_termios_mut, update_wrapper` from the public API. These were previously hidden in the docs but still usable by downstream. (#[1235](https://github.com/nix-rust/nix/pull/1235)) - Nix no longer implements `NixPath` for `Option<P> where P: NixPath`. Most Nix functions that accept `NixPath` arguments can't do anything useful with `None`. The exceptions (`mount` and `quotactl_sync`) already take explicitly optional arguments. (#[1242](https://github.com/nix-rust/nix/pull/1242)) - Removed `unistd::daemon` and `unistd::pipe2` on OSX and ios (#[1255](https://github.com/nix-rust/nix/pull/1255)) - Removed `sys::event::FilterFlag::NOTE_EXIT_REPARENTED` and `sys::event::FilterFlag::NOTE_REAP` on OSX and ios. (#[1255](https://github.com/nix-rust/nix/pull/1255)) - Removed `sys::ptrace::ptrace` on Android and Linux. (#[1255](https://github.com/nix-rust/nix/pull/1255)) - Dropped support for powerpc64-unknown-linux-gnu (#[1266](https://github.com/nix-rust/nix/pull/1268)) #### \[0.17.0] - 3 February 2020 ##### Added - Add `CLK_TCK` to `SysconfVar` (#[1177](https://github.com/nix-rust/nix/pull/1177)) ##### Removed - Removed deprecated Error::description from error types (#[1175](https://github.com/nix-rust/nix/pull/1175)) #### \[0.16.1] - 23 December 2019 ##### Fixed - Fixed the build for OpenBSD (#[1168](https://github.com/nix-rust/nix/pull/1168)) #### \[0.16.0] - 1 December 2019 ##### Added - Added `ptrace::seize()`: similar to `attach()` on Linux but with better-defined semantics. (#[1154](https://github.com/nix-rust/nix/pull/1154)) - Added `Signal::as_str()`: returns signal name as `&'static str` (#[1138](https://github.com/nix-rust/nix/pull/1138)) - Added `posix_fallocate`. ([#&#8203;1105](https://github.com/nix-rust/nix/pull/1105)) - Implemented `Default` for `FdSet` ([#&#8203;1107](https://github.com/nix-rust/nix/pull/1107)) - Added `NixPath::is_empty`. ([#&#8203;1107](https://github.com/nix-rust/nix/pull/1107)) - Added `mkfifoat` ([#&#8203;1133](https://github.com/nix-rust/nix/pull/1133)) - Added `User::from_uid`, `User::from_name`, `User::from_gid` and `Group::from_name`, ([#&#8203;1139](https://github.com/nix-rust/nix/pull/1139)) - Added `linkat` ([#&#8203;1101](https://github.com/nix-rust/nix/pull/1101)) - Added `sched_getaffinity`. ([#&#8203;1148](https://github.com/nix-rust/nix/pull/1148)) - Added optional `Signal` argument to `ptrace::{detach, syscall}` for signal injection. ([#&#8203;1083](https://github.com/nix-rust/nix/pull/1083)) ##### Changed - `sys::termios::BaudRate` now implements `TryFrom<speed_t>` instead of `From<speed_t>`. The old `From` implementation would panic on failure. ([#&#8203;1159](https://github.com/nix-rust/nix/pull/1159)) - `sys::socket::ControlMessage::ScmCredentials` and `sys::socket::ControlMessageOwned::ScmCredentials` now wrap `UnixCredentials` rather than `libc::ucred`. ([#&#8203;1160](https://github.com/nix-rust/nix/pull/1160)) - `sys::socket::recvmsg` now takes a plain `Vec` instead of a `CmsgBuffer` implementor. If you were already using `cmsg_space!`, then you needn't worry. ([#&#8203;1156](https://github.com/nix-rust/nix/pull/1156)) - `sys::socket::recvfrom` now returns `Result<(usize, Option<SockAddr>)>` instead of `Result<(usize, SockAddr)>`. ([#&#8203;1145](https://github.com/nix-rust/nix/pull/1145)) - `Signal::from_c_int` has been replaced by `Signal::try_from` ([#&#8203;1113](https://github.com/nix-rust/nix/pull/1113)) - Changed `readlink` and `readlinkat` to return `OsString` ([#&#8203;1109](https://github.com/nix-rust/nix/pull/1109)) ```rust # use nix::fcntl::{readlink, readlinkat}; // the buffer argument of `readlink` and `readlinkat` has been removed, // and the return value is now an owned type (`OsString`). // Existing code can be updated by removing the buffer argument // and removing any clone or similar operation on the output // old code `readlink(&path, &mut buf)` can be replaced with the following let _: OsString = readlink(&path); // old code `readlinkat(dirfd, &path, &mut buf)` can be replaced with the following let _: OsString = readlinkat(dirfd, &path); ``` - Minimum supported Rust version is now 1.36.0. ([#&#8203;1108](https://github.com/nix-rust/nix/pull/1108)) - `Ipv4Addr::octets`, `Ipv4Addr::to_std`, `Error::as_errno`, `ForkResult::is_child`, `ForkResult::is_parent`, `Gid::as_raw`, `Uid::is_root`, `Uid::as_raw`, `Pid::as_raw`, and `PollFd::revents` now take `self` by value. ([#&#8203;1107](https://github.com/nix-rust/nix/pull/1107)) - Type `&CString` for parameters of `exec(v|ve|vp|vpe|veat)` are changed to `&CStr`. ([#&#8203;1121](https://github.com/nix-rust/nix/pull/1121)) ##### Fixed - Fix length of abstract socket addresses ([#&#8203;1120](https://github.com/nix-rust/nix/pull/1120)) - Fix initialization of msghdr in recvmsg/sendmsg when built with musl ([#&#8203;1136](https://github.com/nix-rust/nix/pull/1136)) ##### Removed - Remove the deprecated `CmsgSpace`. ([#&#8203;1156](https://github.com/nix-rust/nix/pull/1156)) </details> --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0Mi43MC4yIiwidXBkYXRlZEluVmVyIjoiNDIuNzAuMiIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOlsiRGVwZW5kZW5jaWVzIiwiRGVwZW5kZW5jaWVzL1Jlbm92YXRlIl19-->
chore(deps): update rust crate nix to 0.31.0
Some checks failed
Documentation / Build and Deploy Documentation (pull_request) Successful in 1m36s
Update flake hashes / update-flake-hashes (pull_request) Successful in 1m56s
Checks / Prek / Pre-commit & Formatting (pull_request) Successful in 3m53s
Checks / Prek / Clippy and Cargo Tests (pull_request) Failing after 23m39s
ea31ca1adc
ginger force-pushed renovate/nix-0.x from ea31ca1adc
Some checks failed
Documentation / Build and Deploy Documentation (pull_request) Successful in 1m36s
Update flake hashes / update-flake-hashes (pull_request) Successful in 1m56s
Checks / Prek / Pre-commit & Formatting (pull_request) Successful in 3m53s
Checks / Prek / Clippy and Cargo Tests (pull_request) Failing after 23m39s
to 688ef727e5
Some checks failed
Documentation / Build and Deploy Documentation (pull_request) Successful in 2m32s
Checks / Prek / Pre-commit & Formatting (pull_request) Successful in 1m36s
Update flake hashes / update-flake-hashes (pull_request) Successful in 1m4s
Checks / Prek / Clippy and Cargo Tests (pull_request) Successful in 56m5s
Documentation / Build and Deploy Documentation (push) Successful in 2m58s
Checks / Prek / Pre-commit & Formatting (push) Successful in 6m46s
Release Docker Image / Build linux-amd64 (release) (push) Successful in 24m16s
Release Docker Image / Build linux-arm64 (release) (push) Successful in 20m55s
Release Docker Image / Create Multi-arch Release Manifest (push) Successful in 24s
Checks / Prek / Clippy and Cargo Tests (push) Successful in 46m25s
Release Docker Image / Build linux-amd64 (max-perf) (push) Failing after 20m36s
Release Docker Image / Build linux-arm64 (max-perf) (push) Successful in 20m32s
Release Docker Image / Create Max-Perf Manifest (push) Has been skipped
2026-02-21 16:33:06 +00:00
Compare
ginger merged commit 688ef727e5 into main 2026-02-21 17:39:01 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
continuwuation/continuwuity!1430
No description provided.