From 0f0e748adb5234d3eab4db65ebcabbd49877c966 Mon Sep 17 00:00:00 2001 From: bol-van Date: Mon, 16 Feb 2026 12:02:27 +0300 Subject: [PATCH] nfqws2: ensure old toolchains do not break --- nfq/sec.h | 19 +++++++++++++++++++ tpws/sec.h | 19 +++++++++++++++++++ 2 files changed, 38 insertions(+) diff --git a/nfq/sec.h b/nfq/sec.h index 7451bb49..9cb7a51a 100644 --- a/nfq/sec.h +++ b/nfq/sec.h @@ -18,6 +18,25 @@ bool dropcaps(void); #define arch_nr (offsetof(struct seccomp_data, arch)) #define syscall_arg(x) (offsetof(struct seccomp_data, args[x])) +#ifndef __AUDIT_ARCH_64BIT +#define __AUDIT_ARCH_64BIT 0x80000000 +#endif +#ifndef __AUDIT_ARCH_LE +#define __AUDIT_ARCH_LE 0x40000000 +#endif +#ifndef EM_RISCV +#define EM_RISCV 243 +#endif +#ifndef AUDIT_ARCH_RISCV64 +#define AUDIT_ARCH_RISCV64 (EM_RISCV | __AUDIT_ARCH_64BIT | __AUDIT_ARCH_LE) +#endif +#ifndef EM_LOONGARCH +#define EM_LOONGARCH 258 +#endif +#ifndef AUDIT_ARCH_LOONGARCH64 +#define AUDIT_ARCH_LOONGARCH64 (EM_LOONGARCH | __AUDIT_ARCH_64BIT | __AUDIT_ARCH_LE) +#endif + #if defined(__aarch64__) # define ARCH_NR AUDIT_ARCH_AARCH64 diff --git a/tpws/sec.h b/tpws/sec.h index aa84d486..050d517f 100644 --- a/tpws/sec.h +++ b/tpws/sec.h @@ -20,6 +20,25 @@ bool dropcaps(void); #define arch_nr (offsetof(struct seccomp_data, arch)) #define syscall_arg(x) (offsetof(struct seccomp_data, args[x])) +#ifndef __AUDIT_ARCH_64BIT +#define __AUDIT_ARCH_64BIT 0x80000000 +#endif +#ifndef __AUDIT_ARCH_LE +#define __AUDIT_ARCH_LE 0x40000000 +#endif +#ifndef EM_RISCV +#define EM_RISCV 243 +#endif +#ifndef AUDIT_ARCH_RISCV64 +#define AUDIT_ARCH_RISCV64 (EM_RISCV | __AUDIT_ARCH_64BIT | __AUDIT_ARCH_LE) +#endif +#ifndef EM_LOONGARCH +#define EM_LOONGARCH 258 +#endif +#ifndef AUDIT_ARCH_LOONGARCH64 +#define AUDIT_ARCH_LOONGARCH64 (EM_LOONGARCH | __AUDIT_ARCH_64BIT | __AUDIT_ARCH_LE) +#endif + #if defined(__aarch64__) # define ARCH_NR AUDIT_ARCH_AARCH64