summaryrefslogtreecommitdiff
path: root/package/minijail/patches
diff options
context:
space:
mode:
Diffstat (limited to 'package/minijail/patches')
-rw-r--r--package/minijail/patches/patch-common_mk15
-rw-r--r--package/minijail/patches/patch-libminijail_c12
2 files changed, 27 insertions, 0 deletions
diff --git a/package/minijail/patches/patch-common_mk b/package/minijail/patches/patch-common_mk
new file mode 100644
index 000000000..23dc08e77
--- /dev/null
+++ b/package/minijail/patches/patch-common_mk
@@ -0,0 +1,15 @@
+--- minijail-linux-v17.orig/common.mk 2021-08-11 08:01:06.000000000 +0200
++++ minijail-linux-v17/common.mk 2022-01-13 04:53:35.432449083 +0100
+@@ -306,12 +306,6 @@ check_libs_cxx = $(call check_compile,$(
+ check_cc = $(call check_compile_cc,'int main() { return 0; }',$(1),$(2))
+ check_cxx = $(call check_compile_cxx,'int main() { return 0; }',$(1),$(2))
+
+-# Choose the stack protector flags based on whats supported by the compiler.
+-SSP_CFLAGS := $(call check_cc,-fstack-protector-strong)
+-ifeq ($(SSP_CFLAGS),)
+- SSP_CFLAGS := $(call check_cc,-fstack-protector-all)
+-endif
+-
+ # To update these from an including Makefile:
+ # CXXFLAGS += -mahflag # Append to the list
+ # CXXFLAGS := -mahflag $(CXXFLAGS) # Prepend to the list
diff --git a/package/minijail/patches/patch-libminijail_c b/package/minijail/patches/patch-libminijail_c
new file mode 100644
index 000000000..67b06094e
--- /dev/null
+++ b/package/minijail/patches/patch-libminijail_c
@@ -0,0 +1,12 @@
+--- minijail-linux-v17.orig/libminijail.c 2021-08-11 08:01:06.000000000 +0200
++++ minijail-linux-v17/libminijail.c 2022-01-13 04:24:57.190934413 +0100
+@@ -2620,9 +2620,6 @@ static int fd_is_open(int fd)
+ return fcntl(fd, F_GETFD) != -1 || errno != EBADF;
+ }
+
+-static_assert(FD_SETSIZE >= MAX_PRESERVED_FDS * 2 - 1,
+- "If true, ensure_no_fd_conflict will always find an unused fd.");
+-
+ /* If parent_fd will be used by a child fd, move it to an unused fd. */
+ static int ensure_no_fd_conflict(const fd_set *child_fds,
+ int child_fd, int *parent_fd)