Skip to content

Commit 839bfc2

Browse files
devnexentgross35
authored andcommitted
adding new syscall id fchmodat2 for glibc/musl x86 (kernel >= 6.6).
(backport <#3588>) (cherry picked from commit 14bc9fb)
1 parent 567c854 commit 839bfc2

File tree

6 files changed

+8
-0
lines changed

6 files changed

+8
-0
lines changed

libc-test/build.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4210,6 +4210,9 @@ fn test_linux(target: &str) {
42104210
true
42114211
}
42124212

4213+
// FIXME: Requires >= 6.6 kernel headers.
4214+
"SYS_fchmodat2" => true,
4215+
42134216
// FIXME: seems to not be available all the time (from <include/linux/sched.h>:
42144217
"PF_VCPU"
42154218
| "PF_IDLE"

src/unix/linux_like/linux/gnu/b32/x86/mod.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1044,6 +1044,7 @@ pub const SYS_memfd_secret: ::c_long = 447;
10441044
pub const SYS_process_mrelease: ::c_long = 448;
10451045
pub const SYS_futex_waitv: ::c_long = 449;
10461046
pub const SYS_set_mempolicy_home_node: ::c_long = 450;
1047+
pub const SYS_fchmodat2: ::c_long = 452;
10471048

10481049
// offsets in user_regs_structs, from sys/reg.h
10491050
pub const EBX: ::c_int = 0;

src/unix/linux_like/linux/gnu/b64/x86_64/not_x32.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -438,6 +438,7 @@ pub const SYS_memfd_secret: ::c_long = 447;
438438
pub const SYS_process_mrelease: ::c_long = 448;
439439
pub const SYS_futex_waitv: ::c_long = 449;
440440
pub const SYS_set_mempolicy_home_node: ::c_long = 450;
441+
pub const SYS_fchmodat2: ::c_long = 452;
441442

442443
extern "C" {
443444
pub fn sysctl(

src/unix/linux_like/linux/gnu/b64/x86_64/x32.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -366,6 +366,7 @@ pub const SYS_memfd_secret: ::c_long = __X32_SYSCALL_BIT + 447;
366366
pub const SYS_process_mrelease: ::c_long = __X32_SYSCALL_BIT + 448;
367367
pub const SYS_futex_waitv: ::c_long = __X32_SYSCALL_BIT + 449;
368368
pub const SYS_set_mempolicy_home_node: ::c_long = __X32_SYSCALL_BIT + 450;
369+
pub const SYS_fchmodat2: ::c_long = __X32_SYSCALL_BIT + 452;
369370
pub const SYS_rt_sigaction: ::c_long = __X32_SYSCALL_BIT + 512;
370371
pub const SYS_rt_sigreturn: ::c_long = __X32_SYSCALL_BIT + 513;
371372
pub const SYS_ioctl: ::c_long = __X32_SYSCALL_BIT + 514;

src/unix/linux_like/linux/musl/b32/x86/mod.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -936,6 +936,7 @@ pub const SYS_memfd_secret: ::c_long = 447;
936936
pub const SYS_process_mrelease: ::c_long = 448;
937937
pub const SYS_futex_waitv: ::c_long = 449;
938938
pub const SYS_set_mempolicy_home_node: ::c_long = 450;
939+
pub const SYS_fchmodat2: ::c_long = 452;
939940

940941
// offsets in user_regs_structs, from sys/reg.h
941942
pub const EBX: ::c_int = 0;

src/unix/linux_like/linux/musl/b64/x86_64/mod.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -608,6 +608,7 @@ pub const SYS_memfd_secret: ::c_long = 447;
608608
pub const SYS_process_mrelease: ::c_long = 448;
609609
pub const SYS_futex_waitv: ::c_long = 449;
610610
pub const SYS_set_mempolicy_home_node: ::c_long = 450;
611+
pub const SYS_fchmodat2: ::c_long = 452;
611612

612613
// offsets in user_regs_structs, from sys/reg.h
613614
pub const R15: ::c_int = 0;

0 commit comments

Comments
 (0)