diff --git a/sandbox/seccomp/output.go b/sandbox/seccomp/output.go index d583c9e..db81feb 100644 --- a/sandbox/seccomp/output.go +++ b/sandbox/seccomp/output.go @@ -22,8 +22,8 @@ func GetOutput() func(v ...any) { } } -//export F_println -func F_println(v *C.char) { +//export f_println +func f_println(v *C.char) { if fp := printlnP.Load(); fp != nil { (*fp)(C.GoString(v)) } diff --git a/sandbox/seccomp/seccomp-build.c b/sandbox/seccomp/seccomp-build.c index 4b2114f..9423e78 100644 --- a/sandbox/seccomp/seccomp-build.c +++ b/sandbox/seccomp/seccomp-build.c @@ -28,7 +28,7 @@ struct f_syscall_act { #define LEN(arr) (sizeof(arr) / sizeof((arr)[0])) #define SECCOMP_RULESET_ADD(ruleset) do { \ - if (opts & F_VERBOSE) F_println("adding seccomp ruleset \"" #ruleset "\""); \ + if (opts & F_VERBOSE) f_println("adding seccomp ruleset \"" #ruleset "\""); \ for (int i = 0; i < LEN(ruleset); i++) { \ assert(ruleset[i].m_errno == EPERM || ruleset[i].m_errno == ENOSYS); \ \ diff --git a/sandbox/seccomp/seccomp-build.h b/sandbox/seccomp/seccomp-build.h index 7f1be76..d6e53fb 100644 --- a/sandbox/seccomp/seccomp-build.h +++ b/sandbox/seccomp/seccomp-build.h @@ -19,5 +19,5 @@ typedef enum { F_BLUETOOTH = 1 << 8, } f_syscall_opts; -extern void F_println(char *v); +extern void f_println(char *v); int32_t f_build_filter(int *ret_p, int fd, uint32_t arch, uint32_t multiarch, f_syscall_opts opts); \ No newline at end of file diff --git a/sandbox/seccomp/seccomp.go b/sandbox/seccomp/seccomp.go index 9bc74d3..228c683 100644 --- a/sandbox/seccomp/seccomp.go +++ b/sandbox/seccomp/seccomp.go @@ -7,6 +7,7 @@ package seccomp #include "seccomp-build.h" */ import "C" + import ( "errors" "fmt"