void-packages/srcpkgs/firejail/patches/firejail-0.9.32-seccomp.patch

38 lines
1.0 KiB
Diff
Raw Normal View History

From 8014c8d3aa022c851443cbb4226a9481684c9704 Mon Sep 17 00:00:00 2001
From: netblue30 <netblue30@yahoo.com>
Date: Sat, 24 Oct 2015 09:41:11 -0400
Subject: [PATCH] fixed compilation error for --disable-seccomp
---
src/firejail/main.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git src/firejail/main.c src/firejail/main.c
index 422a391..e76f1b4 100644
--- src/firejail/main.c
+++ src/firejail/main.c
@@ -396,7 +396,9 @@ int main(int argc, char **argv) {
int arg_cgroup = 0;
int custom_profile = 0; // custom profile loaded
int arg_noprofile = 0; // use generic.profile if none other found/specified
+#ifdef HAVE_SECCOMP
int highest_errno = errno_highest_nr();
+#endif
// check if we already have a sandbox running
int rv = check_kernel_procs();
@@ -1366,11 +1368,13 @@ int main(int argc, char **argv) {
waitpid(child, NULL, 0);
// free globals
+#ifdef HAVE_SECCOMP
if (arg_seccomp_list_errno) {
for (i = 0; i < highest_errno; i++)
free(arg_seccomp_list_errno[i]);
free(arg_seccomp_list_errno);
}
+#endif
myexit(0);