Skip to content

Commit 43ad680

Browse files
authored
Merge pull request #3588 from devnexen/linux_fchmodat2
adding new syscall id fchmodat2 for glibc/musl x86 (kernel >= 6.6).
2 parents f5c4427 + 14bc9fb commit 43ad680

File tree

6 files changed

+8
-0
lines changed

6 files changed

+8
-0
lines changed

libc-test/build.rs

+3
Original file line numberDiff line numberDiff line change
@@ -4116,6 +4116,9 @@ fn test_linux(target: &str) {
41164116
true
41174117
}
41184118

4119+
// FIXME: Requires >= 6.6 kernel headers.
4120+
"SYS_fchmodat2" => true,
4121+
41194122
// FIXME: seems to not be available all the time (from <include/linux/sched.h>:
41204123
"PF_VCPU"
41214124
| "PF_IDLE"

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

+1
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

+1
Original file line numberDiff line numberDiff line change
@@ -430,6 +430,7 @@ pub const SYS_memfd_secret: ::c_long = 447;
430430
pub const SYS_process_mrelease: ::c_long = 448;
431431
pub const SYS_futex_waitv: ::c_long = 449;
432432
pub const SYS_set_mempolicy_home_node: ::c_long = 450;
433+
pub const SYS_fchmodat2: ::c_long = 452;
433434

434435
extern "C" {
435436
pub fn sysctl(

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

+1
Original file line numberDiff line numberDiff line change
@@ -361,6 +361,7 @@ pub const SYS_memfd_secret: ::c_long = __X32_SYSCALL_BIT + 447;
361361
pub const SYS_process_mrelease: ::c_long = __X32_SYSCALL_BIT + 448;
362362
pub const SYS_futex_waitv: ::c_long = __X32_SYSCALL_BIT + 449;
363363
pub const SYS_set_mempolicy_home_node: ::c_long = __X32_SYSCALL_BIT + 450;
364+
pub const SYS_fchmodat2: ::c_long = __X32_SYSCALL_BIT + 452;
364365
pub const SYS_rt_sigaction: ::c_long = __X32_SYSCALL_BIT + 512;
365366
pub const SYS_rt_sigreturn: ::c_long = __X32_SYSCALL_BIT + 513;
366367
pub const SYS_ioctl: ::c_long = __X32_SYSCALL_BIT + 514;

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

+1
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

+1
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)