relibc: add missing POSIX/Linux headers and constants

New headers:
- include/sys/ioccom.h: Linux UAPI ioctl encoding macros (_IO/_IOR/_IOW/_IOWR)
- include/byteswap.h: bswap_16/32/64 inline functions
- src/header/sys_statfs/: struct statfs + statfs()/fstatfs() functions
  (delegates to fstatvfs, converts to Linux struct statfs format)

New constants:
- sys_socket: MSG_NOSIGNAL, MSG_PROBE, MSG_CONFIRM, MSG_MORE, MSG_FASTOPEN
- sys_mman: MAP_GROWSDOWN, MAP_DENYWRITE, MAP_EXECUTABLE, MAP_LOCKED, MAP_NONBLOCK
- elf/cbindgen.toml: ELFMAG and SELFMAG #defines in after_includes

These headers eliminate the need for shim patches in libwayland (MSG_NOSIGNAL),
mesa (sys/ioccom.h), qtbase (sys/statfs.h, ELFMAG), pipewire/wireplumber
(byteswap.h, MAP_* flags).
This commit is contained in:
Red Bear OS
2026-07-10 14:15:18 +03:00
parent ee3107d873
commit 32df50c8fa
8 changed files with 169 additions and 0 deletions
+5
View File
@@ -51,6 +51,11 @@ pub const MSG_TRUNC: c_int = 32;
pub const MSG_DONTWAIT: c_int = 64;
pub const MSG_WAITALL: c_int = 256;
pub const MSG_CMSG_CLOEXEC: c_int = 0x40000000;
pub const MSG_NOSIGNAL: c_int = 0x4000;
pub const MSG_PROBE: c_int = 0x10;
pub const MSG_CONFIRM: c_int = 0x800;
pub const MSG_MORE: c_int = 0x8000;
pub const MSG_FASTOPEN: c_int = 0x20000000;
pub const IP_ADD_SOURCE_MEMBERSHIP: c_int = 70;
pub const IP_DROP_SOURCE_MEMBERSHIP: c_int = 71;