# Changelog ## [0.2.176](https://github.com/rust-lang/libc/compare/0.2.175...0.2.176) - 2025-09-23 ### Support - The default FreeBSD version has been raised from 11 to 12. This matches `rustc` since 1.78. ([#2406](https://github.com/rust-lang/libc/pull/2406)) - `Debug` is now always implemented, rather than being gated behind the `extra_traits` feature. ([#4624](https://github.com/rust-lang/libc/pull/4624)) ### Added - AIX: Restore some non-POSIX functions guarded by the `_KERNEL` macro. ([#4607](https://github.com/rust-lang/libc/pull/4607)) - FreeBSD 14: Add `st_fileref` to `struct stat` ([#4642](https://github.com/rust-lang/libc/pull/4642)) - Haiku: Add the `accept4` POSIX call ([#4586](https://github.com/rust-lang/libc/pull/4586)) - Introduce a wrapper for representing padding ([#4632](https://github.com/rust-lang/libc/pull/4632)) - Linux: Add `EM_RISCV` ([#4659](https://github.com/rust-lang/libc/pull/4659)) - Linux: Add `MS_NOSYMFOLLOW` ([#4389](https://github.com/rust-lang/libc/pull/4389)) - Linux: Add `backtrace_symbols(_fd)` ([#4668](https://github.com/rust-lang/libc/pull/4668)) - Linux: Add missing `SOL_PACKET` optnames ([#4669](https://github.com/rust-lang/libc/pull/4669)) - Musl s390x: Add `SYS_mseal` ([#4549](https://github.com/rust-lang/libc/pull/4549)) - NuttX: Add `__errno` ([#4687](https://github.com/rust-lang/libc/pull/4687)) - Redox: Add `dirfd`, `VDISABLE`, and resource consts ([#4660](https://github.com/rust-lang/libc/pull/4660)) - Redox: Add more `resource.h`, `fcntl.h` constants ([#4666](https://github.com/rust-lang/libc/pull/4666)) - Redox: Enable `strftime` and `mkostemp[s]` ([#4629](https://github.com/rust-lang/libc/pull/4629)) - Unix, Windows: Add `qsort_r` (Unix), and `qsort(_s)` (Windows) ([#4677](https://github.com/rust-lang/libc/pull/4677)) - Unix: Add `dlvsym` for Linux-gnu, FreeBSD, and NetBSD ([#4671](https://github.com/rust-lang/libc/pull/4671)) - Unix: Add `sigqueue` ([#4620](https://github.com/rust-lang/libc/pull/4620)) ### Changed - FreeBSD 15: Mark `kinfo_proc` as non-exhaustive ([#4553](https://github.com/rust-lang/libc/pull/4553)) - FreeBSD: Set the ELF symbol version for `readdir_r` ([#4694](https://github.com/rust-lang/libc/pull/4694)) - Linux: Correct the config for whether or not `epoll_event` is packed ([#4639](https://github.com/rust-lang/libc/pull/4639)) - Tests: Replace the old `ctest` with the much more reliable new implementation ([#4655](https://github.com/rust-lang/libc/pull/4655) and many related PRs) ### Fixed - AIX: Fix the type of the 4th arguement of `getgrnam_r` ([#4656](https://github.com/rust-lang/libc/pull/4656 - FreeBSD: Limit `P_IDLEPROC` to FreeBSD 15 ([#4640](https://github.com/rust-lang/libc/pull/4640)) - FreeBSD: Limit `mcontext_t::mc_tlsbase` to FreeBSD 15 ([#4640](https://github.com/rust-lang/libc/pull/464)) - FreeBSD: Update gating of `mcontext_t.mc_tlsbase` ([#4703](https://github.com/rust-lang/libc/pull/4703)) - Musl s390x: Correct the definition of `statfs[64]` ([#4549](https://github.com/rust-lang/libc/pull/4549)) - Musl s390x: Make `fpreg_t` a union ([#4549](https://github.com/rust-lang/libc/pull/4549)) - Redox: Fix the types of `gid_t` and `uid_t` ([#4689](https://github.com/rust-lang/libc/pull/4689)) - Redox: Fix the value of `MAP_FIXED` ([#4684](https://github.com/rust-lang/libc/pull/4684)) ### Deprecated - Apple: Correct the `deprecated` attribute for `iconv` ([`a97a0b53`](https://github.com/rust-lang/libc/commit/a97a0b53fb7faf5f99cd720ab12b1b8a5bf9f950)) - FreeBSD: Deprecate `TIOCMGDTRWAIT` and `TIOCMSDTRWAIT` ([#4685](https://github.com/rust-lang/libc/pull/4685)) ### Removed - FreeBSD: Remove `JAIL_{GET,SET}_MASK`, `_MC_FLAG_MASK` ([#4691](https://github.com/rust-lang/libc/pull/4691)) ## [0.2.175](https://github.com/rust-lang/libc/compare/0.2.174...0.2.175) - 2025-08-10 ### Added - AIX: Add `getpeereid` ([#4524](https://github.com/rust-lang/libc/pull/4524)) - AIX: Add `struct ld_info` and friends ([#4578](https://github.com/rust-lang/libc/pull/4578)) - AIX: Retore `struct winsize` ([#4577](https://github.com/rust-lang/libc/pull/4577)) - Android: Add UDP socket option constants ([#4619](https://github.com/rust-lang/libc/pull/4619)) - Android: Add `CLONE_CLEAR_SIGHAND` and `CLONE_INTO_CGROUP` ([#4502](https://github.com/rust-lang/libc/pull/4502)) - Android: Add more `prctl` constants ([#4531](https://github.com/rust-lang/libc/pull/4531)) - FreeBSD Add further TCP stack-related constants ([#4196](https://github.com/rust-lang/libc/pull/4196)) - FreeBSD x86-64: Add `mcontext_t.mc_tlsbase ` ([#4503](https://github.com/rust-lang/libc/pull/4503)) - FreeBSD15: Add `kinfo_proc.ki_uerrmsg` ([#4552](https://github.com/rust-lang/libc/pull/4552)) - FreeBSD: Add `in_conninfo` ([#4482](https://github.com/rust-lang/libc/pull/4482)) - FreeBSD: Add `xinpgen` and related types ([#4482](https://github.com/rust-lang/libc/pull/4482)) - FreeBSD: Add `xktls_session` ([#4482](https://github.com/rust-lang/libc/pull/4482)) - Haiku: Add functionality from `libbsd` ([#4221](https://github.com/rust-lang/libc/pull/4221)) - Linux: Add `SECBIT_*` ([#4480](https://github.com/rust-lang/libc/pull/4480)) - NetBSD, OpenBSD: Export `ioctl` request generator macros ([#4460](https://github.com/rust-lang/libc/pull/4460)) - NetBSD: Add `ptsname_r` ([#4608](https://github.com/rust-lang/libc/pull/4608)) - RISCV32: Add time-related syscalls ([#4612](https://github.com/rust-lang/libc/pull/4612)) - Solarish: Add `strftime*` ([#4453](https://github.com/rust-lang/libc/pull/4453)) - linux: Add `EXEC_RESTRICT_*` and `EXEC_DENY_*` ([#4545](https://github.com/rust-lang/libc/pull/4545)) ### Changed - AIX: Add `const` to signatures to be consistent with other platforms ([#4563](https://github.com/rust-lang/libc/pull/4563)) ### Fixed - AIX: Fix the type of `struct statvfs.f_fsid` ([#4576](https://github.com/rust-lang/libc/pull/4576)) - AIX: Fix the type of constants for the `ioctl` `request` argument ([#4582](https://github.com/rust-lang/libc/pull/4582)) - AIX: Fix the types of `stat{,64}.st_*tim` ([#4597](https://github.com/rust-lang/libc/pull/4597)) - AIX: Use unique `errno` values ([#4507](https://github.com/rust-lang/libc/pull/4507)) - Build: Fix an incorrect `target_os` -> `target_arch` check ([#4550](https://github.com/rust-lang/libc/pull/4550)) - FreeBSD: Fix the type of `xktls_session_onedir.ifnet` ([#4552](https://github.com/rust-lang/libc/pull/4552)) - Mips64 musl: Fix the type of `nlink_t` ([#4509](https://github.com/rust-lang/libc/pull/4509)) - Mips64 musl: Use a special MIPS definition of `stack_t` ([#4528](https://github.com/rust-lang/libc/pull/4528)) - Mips64: Fix `SI_TIMER`, `SI_MESGQ` and `SI_ASYNCIO` definitions ([#4529](https://github.com/rust-lang/libc/pull/4529)) - Musl Mips64: Swap the order of `si_errno` and `si_code` in `siginfo_t` ([#4530](https://github.com/rust-lang/libc/pull/4530)) - Musl Mips64: Use a special MIPS definition of `statfs` ([#4527](https://github.com/rust-lang/libc/pull/4527)) - Musl: Fix the definition of `fanotify_event_metadata` ([#4510](https://github.com/rust-lang/libc/pull/4510)) - NetBSD: Correct `enum fae_action` to be `#[repr(C)]` ([#60a8cfd5](https://github.com/rust-lang/libc/commit/60a8cfd564f83164d45b9533ff7a0d7371878f2a)) - PSP: Correct `char` -> `c_char` ([eaab4fc3](https://github.com/rust-lang/libc/commit/eaab4fc3f05dc646a953d4fd5ba46dfa1f8bd6f6)) - PowerPC musl: Fix `termios` definitions ([#4518](https://github.com/rust-lang/libc/pull/4518)) - PowerPC musl: Fix the definition of `EDEADLK` ([#4517](https://github.com/rust-lang/libc/pull/4517)) - PowerPC musl: Fix the definition of `NCCS` ([#4513](https://github.com/rust-lang/libc/pull/4513)) - PowerPC musl: Fix the definitions of `MAP_LOCKED` and `MAP_NORESERVE` ([#4516](https://github.com/rust-lang/libc/pull/4516)) - PowerPC64 musl: Fix the definition of `shmid_ds` ([#4519](https://github.com/rust-lang/libc/pull/4519)) ### Deprecated - Linux: `MAP_32BIT` is only defined on x86 on non-x86 architectures ([#4511](https://github.com/rust-lang/libc/pull/4511)) ### Removed - AIX: Remove duplicate constant definitions `FIND` and `ENTER` ([#4588](https://github.com/rust-lang/libc/pull/4588)) - s390x musl: Remove `O_FSYNC` ([#4515](https://github.com/rust-lang/libc/pull/4515)) - s390x musl: Remove `RTLD_DEEPBIND` ([#4515](https://github.com/rust-lang/libc/pull/4515)) ## [0.2.174](https://github.com/rust-lang/libc/compare/0.2.173...0.2.174) - 2025-06-17 ### Added - Linux: Make `pidfd_info` fields pub ([#4487](https://github.com/rust-lang/libc/pull/4487)) ### Fixed - Gnu x32: Add missing `timespec.tv_nsec` ([#4497](https://github.com/rust-lang/libc/pull/4497)) - NuttX: Use `nlink_t` type for `st_nlink` in `struct stat` definition ([#4483](https://github.com/rust-lang/libc/pull/4483)) ### Other - Allow new `unpredictable_function_pointer_comparisons` lints ([#4489](https://github.com/rust-lang/libc/pull/4489)) - OpenBSD: Fix some clippy warnings to use `pointer::cast`. ([#4490](https://github.com/rust-lang/libc/pull/4490)) - Remove unessecary semicolons from definitions of `CMSG_NXTHDR`. ([#4492](https://github.com/rust-lang/libc/pull/4492)) ## [0.2.173](https://github.com/rust-lang/libc/compare/0.2.172...0.2.173) - 2025-06-09 ### Added - AIX: Add an AIX triple to Cargo.toml for doc ([#4475](https://github.com/rust-lang/libc/pull/4475)) - FreeBSD: Add the `SO_SPLICE` socket option support for FreeBSD >= 14.2 ([#4451](https://github.com/rust-lang/libc/pull/4451)) - Linux GNU: Prepare for supporting `_TIME_BITS=64` ([#4433](https://github.com/rust-lang/libc/pull/4433)) - Linux: Add constant PACKET_IGNORE_OUTGOING ([#4319](https://github.com/rust-lang/libc/pull/4319)) - Linux: Add constants and types for `nsfs` ioctls ([#4436](https://github.com/rust-lang/libc/pull/4436)) - Linux: Add constants for Memory-Deny-Write-Execute `prctls` ([#4400](https://github.com/rust-lang/libc/pull/4400)) - Linux: Add constants from `linux/cn_proc.h` and `linux/connector.h` ([#4434](https://github.com/rust-lang/libc/pull/4434)) - Linux: Add new flags for `pwritev2` and `preadv2` ([#4452](https://github.com/rust-lang/libc/pull/4452)) - Linux: Add pid_type enum values ([#4403](https://github.com/rust-lang/libc/pull/4403)) - Linux: Update pidfd constants and types (Linux 6.9-6.15) ([#4402](https://github.com/rust-lang/libc/pull/4402)) - Loongarch64 musl: Define the `MADV_SOFT_OFFLINE` constant ([#4448](https://github.com/rust-lang/libc/pull/4448)) - Musl: Add new fields since 1.2.0/1.2.2 to `struct tcp_info` ([#4443](https://github.com/rust-lang/libc/pull/4443)) - Musl: Prepare for supporting v1.2.3 ([#4443](https://github.com/rust-lang/libc/pull/4443)) - NuttX: Add `arc4random` and `arc4random_buf` ([#4464](https://github.com/rust-lang/libc/pull/4464)) - RISC-V Musl: Add `MADV_SOFT_OFFLINE` definition ([#4447](https://github.com/rust-lang/libc/pull/4447)) - Redox: Define SCM_RIGHTS ([#4440](https://github.com/rust-lang/libc/pull/4440)) - VxWorks: Add missing UTIME defines and TASK_RENAME_LENGTH ([#4407](https://github.com/rust-lang/libc/pull/4407)) - Windows: Add more `time.h` functions ([#4427](https://github.com/rust-lang/libc/pull/4427)) ### Changed - Redox: Update `SA_` constants. ([#4426](https://github.com/rust-lang/libc/pull/4426)) - Redox: make `CMSG_ALIGN`, `CMSG_LEN`, and `CMSG_SPACE` const functions ([#4441](https://github.com/rust-lang/libc/pull/4441)) ### Fixed - AIX: Enable libc-test and fix definitions/declarations. ([#4450](https://github.com/rust-lang/libc/pull/4450)) - Emscripten: Fix querying emcc on windows (use emcc.bat) ([#4248](https://github.com/rust-lang/libc/pull/4248)) - Hurd: Fix build from missing `fpos_t` ([#4472](https://github.com/rust-lang/libc/pull/4472)) - Loongarch64 Musl: Fix the `struct ipc_perm` bindings ([#4384](https://github.com/rust-lang/libc/pull/4384)) - Musl: Fix the `O_LARGEFILE` constant value. ([#4443](https://github.com/rust-lang/libc/pull/4443)) ## [0.2.172](https://github.com/rust-lang/libc/compare/0.2.171...0.2.172) - 2025-04-14 ### Added - Android: Add `getauxval` for 32-bit targets ([#4338](https://github.com/rust-lang/libc/pull/4338)) - Android: Add `if_tun.h` ioctls ([#4379](https://github.com/rust-lang/libc/pull/4379)) - Android: Define `SO_BINDTOIFINDEX` ([#4391](https://github.com/rust-lang/libc/pull/4391)) - Cygwin: Add `posix_spawn_file_actions_add[f]chdir[_np]` ([#4387](https://github.com/rust-lang/libc/pull/4387)) - Cygwin: Add new socket options ([#4350](https://github.com/rust-lang/libc/pull/4350)) - Cygwin: Add statfs & fcntl ([#4321](https://github.com/rust-lang/libc/pull/4321)) - FreeBSD: Add `filedesc` and `fdescenttbl` ([#4327](https://github.com/rust-lang/libc/pull/4327)) - Glibc: Add unstable support for _FILE_OFFSET_BITS=64 ([#4345](https://github.com/rust-lang/libc/pull/4345)) - Hermit: Add `AF_UNSPEC` ([#4344](https://github.com/rust-lang/libc/pull/4344)) - Hermit: Add `AF_VSOCK` ([#4344](https://github.com/rust-lang/libc/pull/4344)) - Illumos, NetBSD: Add `timerfd` APIs ([#4333](https://github.com/rust-lang/libc/pull/4333)) - Linux: Add `_IO`, `_IOW`, `_IOR`, `_IOWR` to the exported API ([#4325](https://github.com/rust-lang/libc/pull/4325)) - Linux: Add `tcp_info` to uClibc bindings ([#4347](https://github.com/rust-lang/libc/pull/4347)) - Linux: Add further BPF program flags ([#4356](https://github.com/rust-lang/libc/pull/4356)) - Linux: Add missing INPUT_PROP_XXX flags from `input-event-codes.h` ([#4326](https://github.com/rust-lang/libc/pull/4326)) - Linux: Add missing TLS bindings ([#4296](https://github.com/rust-lang/libc/pull/4296)) - Linux: Add more constants from `seccomp.h` ([#4330](https://github.com/rust-lang/libc/pull/4330)) - Linux: Add more glibc `ptrace_sud_config` and related `PTRACE_*ET_SYSCALL_USER_DISPATCH_CONFIG`. ([#4386](https://github.com/rust-lang/libc/pull/4386)) - Linux: Add new netlink flags ([#4288](https://github.com/rust-lang/libc/pull/4288)) - Linux: Define ioctl codes on more architectures ([#4382](https://github.com/rust-lang/libc/pull/4382)) - Linux: Add missing `pthread_attr_setstack` ([#4349](https://github.com/rust-lang/libc/pull/4349)) - Musl: Add missing `utmpx` API ([#4332](https://github.com/rust-lang/libc/pull/4332)) - Musl: Enable `getrandom` on all platforms ([#4346](https://github.com/rust-lang/libc/pull/4346)) - NuttX: Add more signal constants ([#4353](https://github.com/rust-lang/libc/pull/4353)) - QNX: Add QNX 7.1-iosock and 8.0 to list of additional cfgs ([#4169](https://github.com/rust-lang/libc/pull/4169)) - QNX: Add support for alternative Neutrino network stack `io-sock` ([#4169](https://github.com/rust-lang/libc/pull/4169)) - Redox: Add more `sys/socket.h` and `sys/uio.h` definitions ([#4388](https://github.com/rust-lang/libc/pull/4388)) - Solaris: Temporarily define `O_DIRECT` and `SIGINFO` ([#4348](https://github.com/rust-lang/libc/pull/4348)) - Solarish: Add `secure_getenv` ([#4342](https://github.com/rust-lang/libc/pull/4342)) - VxWorks: Add missing `d_type` member to `dirent` ([#4352](https://github.com/rust-lang/libc/pull/4352)) - VxWorks: Add missing signal-related constsants ([#4352](https://github.com/rust-lang/libc/pull/4352)) - VxWorks: Add more error codes ([#4337](https://github.com/rust-lang/libc/pull/4337)) ### Deprecated - FreeBSD: Deprecate `TCP_PCAP_OUT` and `TCP_PCAP_IN` ([#4381](https://github.com/rust-lang/libc/pull/4381)) ### Fixed - Cygwin: Fix member types of `statfs` ([#4324](https://github.com/rust-lang/libc/pull/4324)) - Cygwin: Fix tests ([#4357](https://github.com/rust-lang/libc/pull/4357)) - Hermit: Make `AF_INET = 3` ([#4344](https://github.com/rust-lang/libc/pull/4344)) - Musl: Fix the syscall table on RISC-V-32 ([#4335](https://github.com/rust-lang/libc/pull/4335)) - Musl: Fix the value of `SA_ONSTACK` on RISC-V-32 ([#4335](https://github.com/rust-lang/libc/pull/4335)) - VxWorks: Fix a typo in the `waitpid` parameter name ([#4334](https://github.com/rust-lang/libc/pull/4334)) ### Removed - Musl: Remove `O_FSYNC` on RISC-V-32 (use `O_SYNC` instead) ([#4335](https://github.com/rust-lang/libc/pull/4335)) - Musl: Remove `RTLD_DEEPBIND` on RISC-V-32 ([#4335](https://github.com/rust-lang/libc/pull/4335)) ### Other - CI: Add matrix env variables to the environment ([#4345](https://github.com/rust-lang/libc/pull/4345)) - CI: Always deny warnings ([#4363](https://github.com/rust-lang/libc/pull/4363)) - CI: Always upload successfully created artifacts ([#4345](https://github.com/rust-lang/libc/pull/4345)) - CI: Install musl from source for loongarch64 ([#4320](https://github.com/rust-lang/libc/pull/4320)) - CI: Revert "Also skip `MFD_EXEC` and `MFD_NOEXEC_SEAL` on sparc64" ([#]()) - CI: Use `$PWD` instead of `$(pwd)` in run-docker ([#4345](https://github.com/rust-lang/libc/pull/4345)) - Solarish: Restrict `openpty` and `forkpty` polyfills to Illumos, replace Solaris implementation with bindings ([#4329](https://github.com/rust-lang/libc/pull/4329)) - Testing: Ensure the makedev test does not emit unused errors ([#4363](https://github.com/rust-lang/libc/pull/4363)) ## [0.2.171](https://github.com/rust-lang/libc/compare/0.2.170...0.2.171) - 2025-03-11 ### Added - Android: Add `if_nameindex`/`if_freenameindex` support ([#4247](https://github.com/rust-lang/libc/pull/4247)) - Apple: Add missing proc types and constants ([#4310](https://github.com/rust-lang/libc/pull/4310)) - BSD: Add `devname` ([#4285](https://github.com/rust-lang/libc/pull/4285)) - Cygwin: Add PTY and group API ([#4309](https://github.com/rust-lang/libc/pull/4309)) - Cygwin: Add support ([#4279](https://github.com/rust-lang/libc/pull/4279)) - FreeBSD: Make `spawn.h` interfaces available on all FreeBSD-like systems ([#4294](https://github.com/rust-lang/libc/pull/4294)) - Linux: Add `AF_XDP` structs for all Linux environments ([#4163](https://github.com/rust-lang/libc/pull/4163)) - Linux: Add SysV semaphore constants ([#4286](https://github.com/rust-lang/libc/pull/4286)) - Linux: Add `F_SEAL_EXEC` ([#4316](https://github.com/rust-lang/libc/pull/4316)) - Linux: Add `SO_PREFER_BUSY_POLL` and `SO_BUSY_POLL_BUDGET` ([#3917](https://github.com/rust-lang/libc/pull/3917)) - Linux: Add `devmem` structs ([#4299](https://github.com/rust-lang/libc/pull/4299)) - Linux: Add socket constants up to `SO_DEVMEM_DONTNEED` ([#4299](https://github.com/rust-lang/libc/pull/4299)) - NetBSD, OpenBSD, DragonflyBSD: Add `closefrom` ([#4290](https://github.com/rust-lang/libc/pull/4290)) - NuttX: Add `pw_passwd` field to `passwd` ([#4222](https://github.com/rust-lang/libc/pull/4222)) - Solarish: define `IP_BOUND_IF` and `IPV6_BOUND_IF` ([#4287](https://github.com/rust-lang/libc/pull/4287)) - Wali: Add bindings for `wasm32-wali-linux-musl` target ([#4244](https://github.com/rust-lang/libc/pull/4244)) ### Changed - AIX: Use `sa_sigaction` instead of a union ([#4250](https://github.com/rust-lang/libc/pull/4250)) - Make `msqid_ds.__msg_cbytes` public ([#4301](https://github.com/rust-lang/libc/pull/4301)) - Unix: Make all `major`, `minor`, `makedev` into `const fn` ([#4208](https://github.com/rust-lang/libc/pull/4208)) ### Deprecated - Linux: Deprecate obsolete packet filter interfaces ([#4267](https://github.com/rust-lang/libc/pull/4267)) ### Fixed - Cygwin: Fix strerror_r ([#4308](https://github.com/rust-lang/libc/pull/4308)) - Cygwin: Fix usage of f! ([#4308](https://github.com/rust-lang/libc/pull/4308)) - Hermit: Make `stat::st_size` signed ([#4298](https://github.com/rust-lang/libc/pull/4298)) - Linux: Correct values for `SI_TIMER`, `SI_MESGQ`, `SI_ASYNCIO` ([#4292](https://github.com/rust-lang/libc/pull/4292)) - NuttX: Update `tm_zone` and `d_name` fields to use `c_char` type ([#4222](https://github.com/rust-lang/libc/pull/4222)) - Xous: Include the prelude to define `c_int` ([#4304](https://github.com/rust-lang/libc/pull/4304)) ### Other - Add labels to FIXMEs ([#4231](https://github.com/rust-lang/libc/pull/4231), [#4232](https://github.com/rust-lang/libc/pull/4232), [#4234](https://github.com/rust-lang/libc/pull/4234), [#4235](https://github.com/rust-lang/libc/pull/4235), [#4236](https://github.com/rust-lang/libc/pull/4236)) - CI: Fix "cannot find libc" error on Sparc64 ([#4317](https://github.com/rust-lang/libc/pull/4317)) - CI: Fix "cannot find libc" error on s390x ([#4317](https://github.com/rust-lang/libc/pull/4317)) - CI: Pass `--no-self-update` to `rustup update` ([#4306](https://github.com/rust-lang/libc/pull/4306)) - CI: Remove tests for the `i586-pc-windows-msvc` target ([#4311](https://github.com/rust-lang/libc/pull/4311)) - CI: Remove the `check_cfg` job ([#4322](https://github.com/rust-lang/libc/pull/4312)) - Change the range syntax that is giving `ctest` problems ([#4311](https://github.com/rust-lang/libc/pull/4311)) - Linux: Split out the stat struct for gnu/b32/mips ([#4276](https://github.com/rust-lang/libc/pull/4276)) ### Removed - NuttX: Remove `pthread_set_name_np` ([#4251](https://github.com/rust-lang/libc/pull/4251)) ## [0.2.170](https://github.com/rust-lang/libc/compare/0.2.169...0.2.170) - 2025-02-23 ### Added - Android: Declare `setdomainname` and `getdomainname` - FreeBSD: Add `evdev` structures - FreeBSD: Add the new `st_filerev` field to `stat32` ([#4254](https://github.com/rust-lang/libc/pull/4254)) - Linux: Add `SI_*`` and `TRAP_*`` signal codes - Linux: Add experimental configuration to enable 64-bit time in kernel APIs, set by `RUST_LIBC_UNSTABLE_LINUX_TIME_BITS64`. - Linux: Add recent socket timestamping flags - Linux: Added new CANFD_FDF flag for the flags field of canfd_frame - Musl: add CLONE_NEWTIME - Solarish: add the posix_spawn family of functions ### Deprecated - Linux: deprecate kernel modules syscalls ### Changed - Emscripten: Assume version is at least 3.1.42 ### Fixed - BSD: Correct the definition of `WEXITSTATUS` - Hurd: Fix CMSG_DATA on 64bit systems ([#4240](https://github.com/rust-lang/libc/pull/424)) - NetBSD: fix `getmntinfo` ([#4265](https://github.com/rust-lang/libc/pull/4265) - VxWorks: Fix the size of `time_t` ### Other - Add labels to FIXMEs , , - CI: Bump FreeBSD CI to 13.4 and 14.2 - Copy definitions from core::ffi and centralize them - Define c_char at top-level and remove per-target c_char definitions - Port style.rs to syn and add tests for the style checker ## [0.2.169](https://github.com/rust-lang/libc/compare/0.2.168...0.2.169) - 2024-12-18 ### Added - FreeBSD: add more socket TCP stack constants - Fuchsia: add a `sockaddr_vm` definition ### Fixed **Breaking**: [rust-lang/rust#132975](https://github.com/rust-lang/rust/pull/132975) corrected the signedness of `core::ffi::c_char` on various Tier 2 and Tier 3 platforms (mostly Arm and RISC-V) to match Clang. This release contains the corresponding changes to `libc`, including the following specific pull requests: - ESP-IDF: Replace arch-conditional `c_char` with a reexport - Fix `c_char` on various targets - Mirror `c_char` configuration from `rust-lang/rust` ### Cleanup - Do not re-export `c_void` in target-specific code ## [0.2.168](https://github.com/rust-lang/libc/compare/0.2.167...0.2.168) - 2024-12-09 ### Added - Linux: Add new process flags ([#4174](https://github.com/rust-lang/libc/pull/4174)) - Linux: Make `IFA_*` constants available on all Linux targets - Linux: add `MAP_DROPPABLE` - Solaris, Illumos: add `SIGRTMIN` and `SIGRTMAX` - Unix, Linux: adding POSIX `memccpy` and `mempcpy` GNU extension - CI: Upload artifacts created by libc-test - CI: Use workflow commands to group output by target - CI: add caching ## [0.2.167](https://github.com/rust-lang/libc/compare/0.2.166...0.2.167) - 2024-11-28 ### Added - Solarish: add `st_fstype` to `stat` - Trusty: Add `intptr_t` and `uintptr_t` ([#4161](https://github.com/rust-lang/libc/pull/4161)) ### Fixed - Fix the build with `rustc-dep-of-std` - Wasi: Add back unsafe block for `clockid_t` static variables ([#4157](https://github.com/rust-lang/libc/pull/4157)) ### Cleanup - Create an internal prelude - Fix `unused_qualifications` ### Other - CI: Check various FreeBSD versions ([#4159](https://github.com/rust-lang/libc/pull/4159)) - CI: add a timeout for all jobs - CI: verify MSRV for `wasm32-wasi` - Migrate to the 2021 edition ### Removed - Remove one unused import after the edition 2021 bump ## [0.2.166](https://github.com/rust-lang/libc/compare/0.2.165...0.2.166) - 2024-11-26 ### Fixed This release resolves two cases of unintentional breakage from the previous release: - Revert removal of array size hacks [#4150](https://github.com/rust-lang/libc/pull/4150) - Ensure `const extern` functions are always enabled [#4151](https://github.com/rust-lang/libc/pull/4151) ## [0.2.165](https://github.com/rust-lang/libc/compare/0.2.164...0.2.165) - 2024-11-25 ### Added - Android: add `mkostemp`, `mkostemps` - Android: add a few API 30 calls - Android: add missing syscall constants - Apple: add `in6_ifreq` - Apple: add missing `sysctl` net types (before release: remove `if_family_id` ([#4137](https://github.com/rust-lang/libc/pulls/4137))) - Freebsd: add `kcmp` call support - Hurd: add `MAP_32BIT` and `MAP_EXCL` - Hurd: add `domainname` field to `utsname` ([#4089](https://github.com/rust-lang/libc/pulls/4089)) - Linux GNU: add `f_flags` to struct `statfs` for arm, mips, powerpc and x86 - Linux GNU: add `malloc_stats` - Linux: add ELF relocation-related structs - Linux: add `ptp_*` structs - Linux: add `ptp_clock_caps` - Linux: add `ptp_pin_function` and most `PTP_` constants - Linux: add missing AF_XDP structs & constants - Linux: add missing netfilter consts ([#3734](https://github.com/rust-lang/libc/pulls/3734)) - Linux: add struct and constants for the `mount_setattr` syscall - Linux: add wireless API - Linux: expose the `len8_dlc` field of `can_frame` - Musl: add `utmpx` API - Musl: add missing syscall constants - NetBSD: add `mcontext`-related data for RISCV64 - Redox: add new `netinet` constants ) - Solarish: add `_POSIX_VDISABLE` ([#4103](https://github.com/rust-lang/libc/pulls/4103)) - Tests: Add a test that the `const extern fn` macro works - Tests: Add test of primitive types against `std` - Unix: Add `htonl`, `htons`, `ntohl`, `ntohs` - Unix: add `aligned_alloc` - Windows: add `aligned_realloc` ### Fixed - **breaking** Hurd: fix `MAP_HASSEMAPHORE` name ([#4127](https://github.com/rust-lang/libc/pulls/4127)) - **breaking** ulibc Mips: fix `SA_*` mismatched types ([#3211](https://github.com/rust-lang/libc/pulls/3211)) - Aix: fix an enum FFI safety warning - Haiku: fix some typos ([#3664](https://github.com/rust-lang/libc/pulls/3664)) - Tests: fix `Elf{32,64}_Relr`-related tests - Tests: fix libc-tests for `loongarch64-linux-musl` - Tests: fix some clippy warnings - Tests: fix tests on `riscv64gc-unknown-freebsd` ### Deprecated - Apple: deprecate `iconv_open` - Apple: deprecate `mach_task_self` - Apple: update `mach` deprecation notices for things that were removed in `main` ### Cleanup - Adjust the `f!` macro to be more flexible - Aix: remove duplicate constants - CI: make scripts more uniform - Drop the `libc_align` conditional - Drop the `libc_cfg_target_vendor` conditional - Drop the `libc_const_size_of` conditional - Drop the `libc_core_cvoid` conditional - Drop the `libc_int128` conditional - Drop the `libc_non_exhaustive` conditional - Drop the `libc_packedN` conditional - Drop the `libc_priv_mod_use` conditional - Drop the `libc_union` conditional - Drop the `long_array` conditional - Drop the `ptr_addr_of` conditional - Drop warnings about deprecated cargo features - Eliminate uses of `struct_formatter` - Fix a few other array size hacks - Glibc: remove redundant definitions ([#3261](https://github.com/rust-lang/libc/pulls/3261)) - Musl: remove redundant definitions ([#3261](https://github.com/rust-lang/libc/pulls/3261)) - Musl: unify definitions of `siginfo_t` ([#3261](https://github.com/rust-lang/libc/pulls/3261)) - Musl: unify definitions of statfs and statfs64 ([#3261](https://github.com/rust-lang/libc/pulls/3261)) - Musl: unify definitions of statvfs and statvfs64 ([#3261](https://github.com/rust-lang/libc/pulls/3261)) - Musl: unify statx definitions ([#3978](https://github.com/rust-lang/libc/pulls/3978)) - Remove array size hacks for Rust < 1.47 - Remove repetitive words - Use #[derive] for Copy/Clone in s! and friends - Use some tricks to format macro bodies ### Other - Apply formatting to macro bodies - Bump libc-test to Rust 2021 Edition - CI: Add a check that semver files don't contain duplicate entries - CI: Add `fanotify_event_info_fid` to FAM-exempt types - CI: Allow rustfmt to organize imports ([#4136](https://github.com/rust-lang/libc/pulls/4136)) - CI: Always run rustfmt - CI: Change 32-bit Docker images to use EOL repos - CI: Change 64-bit Docker images to ubuntu:24.10 - CI: Disable the check for >1 s! invocation - CI: Ensure build channels get run even if FILTER is unset - CI: Ensure there is a fallback for no_std - CI: Fix cases where unset variables cause errors - CI: Naming adjustments and cleanup - CI: Only invoke rustup if running in CI - CI: Remove the logic to handle old rust versions - CI: Set -u (error on unset) in all script files - CI: add support for `loongarch64-unknown-linux-musl` - CI: make `aarch64-apple-darwin` not a nightly-only target - CI: run shellcheck on all scripts - CI: update musl headers to Linux 6.6 - CI: use qemu-sparc64 to run sparc64 tests - Drop the `libc_const_extern_fn` conditional - Drop the `libc_underscore_const_names` conditional - Explicitly set the edition to 2015 - Introduce a `git-blame-ignore-revs` file - Tests: Ignore fields as required on Ubuntu 24.10 - Tests: skip `ATF_*` constants for OpenBSD - Triagebot: Add an autolabel for CI ## [0.2.164](https://github.com/rust-lang/libc/compare/0.2.163...0.2.164) - 2024-11-16 ### MSRV This release increases the MSRV of `libc` to 1.63. ### Other - CI: remove tests with rust < 1.63 - MSRV: document the MSRV of the stable channel to be 1.63 - MacOS: move ifconf to s_no_extra_traits ## [0.2.163](https://github.com/rust-lang/libc/compare/0.2.162...0.2.163) - 2024-11-16 ### Added - Aix: add more `dlopen` flags - Android: add group calls - FreeBSD: add `TCP_FUNCTION_BLK` and `TCP_FUNCTION_ALIAS` - Linux: add `confstr` - Solarish: add `aio` - Solarish: add `arc4random*` ### Changed - Emscripten: upgrade emsdk to 3.1.68 - Hurd: use more standard types - Hurd: use the standard `ssize_t = isize` - Solaris: fix `confstr` and `ucontext_t` ### Other - CI: add Solaris - CI: add `i686-unknown-freebsd` - CI: ensure that calls to `sort` do not depend on locale - Specify `rust-version` in `Cargo.toml` ## [0.2.162](https://github.com/rust-lang/libc/compare/0.2.161...0.2.162) - 2024-11-07 ### Added - Android: fix the alignment of `uc_mcontext` on arm64 - Apple: add `host_cpu_load_info` - ESP-IDF: add a time flag - FreeBSD: add the `CLOSE_RANGE_CLOEXEC` flag - FreeBSD: fix test errors regarding `__gregset_t` - FreeBSD: fix tests on x86 FreeBSD 15 - FreeBSD: make `ucontext_t` and `mcontext_t` available on all architectures - Haiku: add `getentropy` - Illumos: add `syncfs` - Illumos: add some recently-added constants - Linux: add `ioctl` flags - Linux: add epoll busy polling parameters - NuttX: add `pthread_[get/set]name_np` - RTEMS: add `arc4random_buf` - Trusty OS: add initial support - WASIp2: expand socket support ### Fixed - Emscripten: don't pass `-lc` - Hurd: change `st_fsid` field to `st_dev` - Hurd: fix the definition of `utsname` - Illumos/Solaris: fix `FNM_CASEFOLD` definition - Solaris: fix all tests ### Other - CI: Add loongarch64 - CI: Check that semver files are sorted - CI: Re-enable the FreeBSD 15 job - Clean up imports and `extern crate` usage - Convert `mode_t` constants to octal - Remove the `wasm32-wasi` target that has been deleted upstream ## [0.2.161](https://github.com/rust-lang/libc/compare/0.2.160...0.2.161) - 2024-10-17 ### Fixed - OpenBSD: fix `FNM_PATHNAME` and `FNM_NOESCAPE` values ## [0.2.160](https://github.com/rust-lang/libc/compare/0.2.159...0.2.160) - 2024-10-17 ### Added - Android: add `PR_GET_NAME` and `PR_SET_NAME` - Apple: add `F_TRANSFEREXTENTS` - Apple: add `mach_error_string` - Apple: add additional `pthread` APIs - Apple: add the `LOCAL_PEERTOKEN` socket option - BSD: add `RTF_*`, `RTA_*`, `RTAX_*`, and `RTM_*` definitions - Emscripten: add `AT_EACCESS` - Emscripten: add `getgrgid`, `getgrnam`, `getgrnam_r` and `getgrgid_r` - Emscripten: add `getpwnam_r` and `getpwuid_r` - FreeBSD: add `POLLRDHUP` - Haiku: add `arc4random` - Illumos: add `ptsname_r` - Linux: add `fanotify` interfaces - Linux: add `tcp_info` - Linux: add additional AF_PACKET options - Linux: make Elf constants always available - Musl x86: add `iopl` and `ioperm` - Musl: add `posix_spawn` chdir functions - Musl: add `utmpx.h` constants - NetBSD: add `sysctlnametomib`, `CLOCK_THREAD_CPUTIME_ID` and `CLOCK_PROCESS_CPUTIME_ID` - Nuttx: initial support - RTEMS: add `getentropy` - RTEMS: initial support - Solarish: add `POLLRDHUP`, `POSIX_FADV_*`, `O_RSYNC`, and `posix_fallocate` - Unix: add `fnmatch.h` - VxWorks: add riscv64 support - VxWorks: update constants related to the scheduler ### Changed - Redox: change `ino_t` to be `c_ulonglong` ### Fixed - ESP-IDF: fix mismatched constants and structs - FreeBSD: fix `struct stat` on FreeBSD 12+ ### Other - CI: Fix CI for FreeBSD 15 - Docs: link to `windows-sys` ## [0.2.159](https://github.com/rust-lang/libc/compare/0.2.158...0.2.159) - 2024-09-24 ### Added - Android: add more `AT_*` constants in - Apple: add missing `NOTE_*` constants in - Hermit: add missing error numbers in - Hurd: add `__timeval` for 64-bit support in - Linux: add `epoll_pwait2` in - Linux: add `mq_notify` in - Linux: add missing `NFT_CT_*` constants in - Linux: add the `fchmodat2` syscall in - Linux: add the `mseal` syscall in - OpenBSD: add `sendmmsg` and `recvmmsg` in - Unix: add `IN6ADDR_ANY_INIT` and `IN6ADDR_LOOPBACK_INIT` in - VxWorks: add `S_ISVTX` in - VxWorks: add `vxCpuLib` and `taskLib` functions - WASIp2: add definitions for `std::net` support in ### Fixed - Correctly handle version checks when `clippy-driver` is used ### Changed - EspIdf: change signal constants to c_int in - HorizonOS: update network definitions in - Linux: combine `ioctl` APIs in - WASI: enable CI testing in - WASIp2: enable CI testing in ## [0.2.158](https://github.com/rust-lang/libc/compare/0.2.157...0.2.158) - 2024-08-19 ### Other - WASI: fix missing `Iterator` with `rustc-dep-of-std` in ## [0.2.157](https://github.com/rust-lang/libc/compare/0.2.156...0.2.157) - 2024-08-17 ### Added - Apple: add `_NSGetArgv`, `_NSGetArgc` and `_NSGetProgname` in - Build: add `RUSTC_WRAPPER` support in - FreeBSD: add `execvpe` support from 14.1 release in - Fuchsia: add `SO_BINDTOIFINDEX` - Linux: add `klogctl` in - MacOS: add `fcntl` OFD commands in - NetBSD: add `_lwp_park` in - Solaris: add missing networking support in - Unix: add `pthread_equal` in - WASI: add `select`, `FD_SET`, `FD_ZERO`, `FD_ISSET ` in ### Fixed - TEEOS: fix octal notation for `O_*` constants in ### Changed - FreeBSD: always use freebsd12 when `rustc_dep_of_std` is set in ## [0.2.156](https://github.com/rust-lang/libc/compare/v0.2.155...v0.2.156) - 2024-08-15 ### Added - Apple: add `F_ALLOCATEPERSIST` in - Apple: add `os_sync_wait_on_address` and related definitions in - BSD: generalise `IPV6_DONTFRAG` to all BSD targets in - FreeBSD/DragonFly: add `IP_RECVTTL`/`IPV6_RECVHOPLIMIT` in - Hurd: add `XATTR_CREATE`, `XATTR_REPLACE` in - Linux GNU: `confstr` API and `_CS_*` in - Linux musl: add `preadv2` and `pwritev2` (1.2.5 min.) in - VxWorks: add the constant `SOMAXCONN` in - VxWorks: add a few errnoLib related constants in ### Fixed - Solaris/illumos: Change `ifa_flags` type to u64 in - QNX 7.0: Disable `libregex` in ### Changed - QNX NTO: update platform support in - `addr_of!(EXTERN_STATIC)` is now considered safe in ### Removed - Apple: remove `rmx_state` in ### Other - Update or remove CI tests that have been failing