summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Jones <drjones@redhat.com>2015-07-01 13:52:39 -0400
committerPaul Moore <pmoore@redhat.com>2015-07-01 13:52:39 -0400
commit1758ae6be10c85ccd715c12be10d9a4b53d0ab0f (patch)
treefcbe789317bed92fd4cbbeef21a691196e904491
parenta56af152c967f93f58fcdbb5ba6aa75f5e56f504 (diff)
downloadlibseccomp-1758ae6be10c85ccd715c12be10d9a4b53d0ab0f.tar.gz
arm: fix arm-specific syscall symbols
The symbols are prefixed with __ARM_NR_, not __NR_. We still shoehorn the symbols into the __NR_ format for libseccomp though. Doing so keeps SCMP_SYS simple. Signed-off-by: Andrew Jones <drjones@redhat.com> Signed-off-by: Paul Moore <pmoore@redhat.com> (imported from commit 0cad182e971a06d61aeeacc7bd0d94be872e37b8)
-rw-r--r--include/seccomp.h.in30
1 files changed, 20 insertions, 10 deletions
diff --git a/include/seccomp.h.in b/include/seccomp.h.in
index 0751191..4cfc17c 100644
--- a/include/seccomp.h.in
+++ b/include/seccomp.h.in
@@ -1227,9 +1227,11 @@ int seccomp_export_bpf(const scmp_filter_ctx ctx, int fd);
#endif /* __NR_cachectl */
#define __PNR_cacheflush -10104
-#ifndef __NR_cacheflush
+#ifdef __ARM_NR_cacheflush
+#define __NR_cacheflush __ARM_NR_cacheflush
+#else
#define __NR_cacheflush __PNR_cacheflush
-#endif /* __NR_cacheflush */
+#endif /* __ARM_NR_cacheflush */
#define __PNR_sysmips -10106
#ifndef __NR_sysmips
@@ -1447,24 +1449,32 @@ int seccomp_export_bpf(const scmp_filter_ctx ctx, int fd);
#endif /* __NR_utimes */
#define __PNR_breakpoint -10182
-#ifndef __NR_breakpoint
+#ifdef __ARM_NR_breakpoint
+#define __NR_breakpoint __ARM_NR_breakpoint
+#else
#define __NR_breakpoint __PNR_breakpoint
-#endif /* __NR_breakpoint */
+#endif /* __ARM_NR_breakpoint */
#define __PNR_set_tls -10183
-#ifndef __NR_set_tls
+#ifdef __ARM_NR_set_tls
+#define __NR_set_tls __ARM_NR_set_tls
+#else
#define __NR_set_tls __PNR_set_tls
-#endif /* __NR_set_tls */
+#endif /* __ARM_NR_set_tls */
#define __PNR_usr26 -10184
-#ifndef __NR_usr26
+#ifdef __ARM_NR_usr26
+#define __NR_usr26 __ARM_NR_usr26
+#else
#define __NR_usr26 __PNR_usr26
-#endif /* __NR_usr26 */
+#endif /* __ARM_NR_usr26 */
#define __PNR_usr32 -10185
-#ifndef __NR_usr32
+#ifdef __ARM_NR_usr32
+#define __NR_usr32 __ARM_NR_usr32
+#else
#define __NR_usr32 __PNR_usr32
-#endif /* __NR_usr32 */
+#endif /* __ARM_NR_usr32 */
#ifdef __cplusplus
}