File seccomp-new-syscalls.patch of Package libseccomp.38355

Index: libseccomp-2.5.3/include/seccomp-syscalls.h
===================================================================
--- libseccomp-2.5.3.orig/include/seccomp-syscalls.h
+++ libseccomp-2.5.3/include/seccomp-syscalls.h
@@ -1301,7 +1301,9 @@
 
 #define __SNR_openat			__NR_openat
 
+#ifdef __NR_openat2
 #define __SNR_openat2			__NR_openat2
+#endif
 
 #ifdef __NR_pause
 #define __SNR_pause			__NR_pause
Index: libseccomp-2.5.3/include/seccomp.h
===================================================================
--- libseccomp-2.5.3.orig/include/seccomp.h.in
+++ libseccomp-2.5.3/include/seccomp.h.in
@@ -818,6 +818,24 @@ int seccomp_export_bpf(const scmp_filter
 #define __NR_SCMP_ERROR		-1
 #define __NR_SCMP_UNDEF		-2
 
+#ifndef __NR_seccomp
+#if defined(__aarch64__)
+# define __NR_seccomp 277
+#endif
+#if defined(__powerpc__) || defined(__powerpc64__)
+# define __NR_seccomp 358
+#endif
+#if defined(__s390__) || defined(__s390x__)
+# define __NR_seccomp 348
+#endif
+#if defined(__i386__)
+# define __NR_seccomp 354
+#endif
+#if defined(__x86_64__)
+# define __NR_seccomp 317
+#endif
+#endif
+
 #include <seccomp-syscalls.h>
 
 #ifdef __cplusplus
openSUSE Build Service is sponsored by