summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorETKNeil <89385146+ETKNeil@users.noreply.github.com>2023-01-19 16:38:27 +0100
committerETKNeil <89385146+ETKNeil@users.noreply.github.com>2023-02-20 09:56:55 +0100
commit69f06d1046afc9dbc7d9de7d50e4a28ec7cabb5b (patch)
tree15fc5ed05a92e2a24945a646c80d65a223881fea
parente401a59dd35171983545072eb296b1b1ced1b8c1 (diff)
downloadrust-libc-69f06d1046afc9dbc7d9de7d50e4a28ec7cabb5b.tar.gz
Add STATX_DIOALIGN (introduced in linux v6.1)
-rw-r--r--libc-test/build.rs3
-rw-r--r--libc-test/semver/linux-gnu.txt1
-rw-r--r--src/unix/linux_like/linux/gnu/mod.rs4
3 files changed, 7 insertions, 1 deletions
diff --git a/libc-test/build.rs b/libc-test/build.rs
index ea7db1a503..8bf82db8a4 100644
--- a/libc-test/build.rs
+++ b/libc-test/build.rs
@@ -3592,6 +3592,9 @@ fn test_linux(target: &str) {
// Added in Linux 5.14
"FUTEX_LOCK_PI2" => true,
+ // Added in linux 6.1
+ "STATX_DIOALIGN" => true,
+
// FIXME: Parts of netfilter/nfnetlink*.h require more recent kernel headers:
| "RTNLGRP_MCTP_IFADDR" // linux v5.17+
| "RTNLGRP_TUNNEL" // linux v5.18+
diff --git a/libc-test/semver/linux-gnu.txt b/libc-test/semver/linux-gnu.txt
index 665b085a7e..aaeb408150 100644
--- a/libc-test/semver/linux-gnu.txt
+++ b/libc-test/semver/linux-gnu.txt
@@ -435,6 +435,7 @@ STATX_BASIC_STATS
STATX_BLOCKS
STATX_BTIME
STATX_CTIME
+STATX_DIOALIGN
STATX_GID
STATX_INO
STATX_MNT_ID
diff --git a/src/unix/linux_like/linux/gnu/mod.rs b/src/unix/linux_like/linux/gnu/mod.rs
index b8b6dedeb7..21396751d0 100644
--- a/src/unix/linux_like/linux/gnu/mod.rs
+++ b/src/unix/linux_like/linux/gnu/mod.rs
@@ -37,7 +37,8 @@ s! {
pub stx_dev_major: u32,
pub stx_dev_minor: u32,
pub stx_mnt_id: u64,
- __statx_pad2: u64,
+ pub stx_dio_mem_align: u32,
+ pub stx_dio_offset_align: u32,
__statx_pad3: [u64; 12],
}
@@ -1022,6 +1023,7 @@ pub const STATX_BLOCKS: ::c_uint = 0x0400;
pub const STATX_BASIC_STATS: ::c_uint = 0x07ff;
pub const STATX_BTIME: ::c_uint = 0x0800;
pub const STATX_MNT_ID: ::c_uint = 0x1000;
+pub const STATX_DIOALIGN: ::c_uint = 0x2000;
pub const STATX_ALL: ::c_uint = 0x0fff;
pub const STATX__RESERVED: ::c_int = 0x80000000;
pub const STATX_ATTR_COMPRESSED: ::c_int = 0x0004;