---
 src/seccomp.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/src/seccomp.c b/src/seccomp.c
index f867abc..091937d 100644
--- a/src/seccomp.c
+++ b/src/seccomp.c
@@ -213,9 +213,15 @@ enable_sandbox(int flags, int action)
 	ALLOW_RULE(writev);
 
 	/* Newer variants we don't use. ENOSYS lets glibc fall back. */
+#ifdef __NR_openat2
 	ERRNO_RULE(openat2);
+#endif
+#ifdef __NR_faccessat2
 	ERRNO_RULE(faccessat2);
+#endif
+#ifdef __NR_close_range
 	ERRNO_RULE(close_range);
+#endif
 
 
 #if 0
-- 
2.34.1

