missing: add quotactl_fd() wrapper

This commit is contained in:
Lennart Poettering
2025-01-15 13:24:04 +01:00
parent f91f1eda08
commit 7adafb0832
4 changed files with 86 additions and 0 deletions
+68
View File
@@ -1197,3 +1197,71 @@ assert_cc(__NR_statx == systemd_NR_statx);
# endif
# endif
#endif
#ifndef __IGNORE_quotactl_fd
# if defined(__aarch64__)
# define systemd_NR_quotactl_fd 443
# elif defined(__alpha__)
# define systemd_NR_quotactl_fd 553
# elif defined(__arc__) || defined(__tilegx__)
# define systemd_NR_quotactl_fd 443
# elif defined(__arm__)
# define systemd_NR_quotactl_fd 443
# elif defined(__i386__)
# define systemd_NR_quotactl_fd 443
# elif defined(__ia64__)
# define systemd_NR_quotactl_fd 1467
# elif defined(__loongarch_lp64)
# define systemd_NR_quotactl_fd 443
# elif defined(__m68k__)
# define systemd_NR_quotactl_fd 443
# elif defined(_MIPS_SIM)
# if _MIPS_SIM == _MIPS_SIM_ABI32
# define systemd_NR_quotactl_fd 4443
# elif _MIPS_SIM == _MIPS_SIM_NABI32
# define systemd_NR_quotactl_fd 6443
# elif _MIPS_SIM == _MIPS_SIM_ABI64
# define systemd_NR_quotactl_fd 5443
# else
# error "Unknown MIPS ABI"
# endif
# elif defined(__hppa__)
# define systemd_NR_quotactl_fd 443
# elif defined(__powerpc__)
# define systemd_NR_quotactl_fd 443
# elif defined(__riscv)
# if __riscv_xlen == 32
# define systemd_NR_quotactl_fd 443
# elif __riscv_xlen == 64
# define systemd_NR_quotactl_fd 443
# else
# error "Unknown RISC-V ABI"
# endif
# elif defined(__s390__)
# define systemd_NR_quotactl_fd 443
# elif defined(__sparc__)
# define systemd_NR_quotactl_fd 443
# elif defined(__x86_64__)
# if defined(__ILP32__)
# define systemd_NR_quotactl_fd (443 | /* __X32_SYSCALL_BIT */ 0x40000000)
# else
# define systemd_NR_quotactl_fd 443
# endif
# elif !defined(missing_arch_template)
# warning "quotactl_fd() syscall number is unknown for your architecture"
# endif
/* may be an (invalid) negative number due to libseccomp, see PR 13319 */
# if defined __NR_quotactl_fd && __NR_quotactl_fd >= 0
# if defined systemd_NR_quotactl_fd
assert_cc(__NR_quotactl_fd == systemd_NR_quotactl_fd);
# endif
# else
# if defined __NR_quotactl_fd
# undef __NR_quotactl_fd
# endif
# if defined systemd_NR_quotactl_fd && systemd_NR_quotactl_fd >= 0
# define __NR_quotactl_fd systemd_NR_quotactl_fd
# endif
# endif
#endif