mirror of
https://github.com/LibreELEC/LibreELEC.tv.git
synced 2025-07-24 11:16:51 +00:00
Merge pull request #2703 from CvH/9.0-systemd-fix-aml
systemd: add patches to fix 3.14 aml
This commit is contained in:
commit
c943088e24
@ -1,32 +0,0 @@
|
||||
From a2a46bc87819ed5fcb06275f1dcba5a9043ef5cd Mon Sep 17 00:00:00 2001
|
||||
From: MilhouseVH <milhouseVH.github@nmacleod.com>
|
||||
Date: Sun, 4 Feb 2018 07:42:40 +0000
|
||||
Subject: [PATCH] force enable HAVE_MEMFD_CREATE when building with glibc-2.27+
|
||||
|
||||
I'm not sure why, but when building with kernel 3.14.y (which does not
|
||||
have the memfd_create syscall - added in 3.17.0), meson will fail to
|
||||
determine that the memfd_create syscall is now implemented by glibc-2.27+
|
||||
causing systemd to redefine it, resulting in a build failure.
|
||||
|
||||
Since we know thst the syscall is provided by glibc-2.27 this change should be
|
||||
safe (but ugly). Only required for older kernels as meson correctly enables
|
||||
this option with default kernels (eg. 4.14.16), and forcing it does no harm.
|
||||
---
|
||||
meson.build | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/meson.build b/meson.build
|
||||
index 36a62d2..4f56ccb 100644
|
||||
--- a/meson.build
|
||||
+++ b/meson.build
|
||||
@@ -515,6 +515,7 @@ foreach ident : [
|
||||
have = cc.has_function(ident[0], prefix : ident[1], args : '-D_GNU_SOURCE')
|
||||
conf.set10('HAVE_' + ident[0].to_upper(), have)
|
||||
endforeach
|
||||
+conf.set10('HAVE_MEMFD_CREATE', true)
|
||||
|
||||
if cc.has_function('getrandom', prefix : '''#include <sys/random.h>''', args : '-D_GNU_SOURCE')
|
||||
conf.set10('USE_SYS_RANDOM_H', true)
|
||||
--
|
||||
2.14.1
|
||||
|
@ -0,0 +1,42 @@
|
||||
https://github.com/systemd/systemd/pull/8391
|
||||
From 3b3a93045c3e35b45e410d765eaad78300104cec Mon Sep 17 00:00:00 2001
|
||||
From: Yu Watanabe <watanabe.yu+github@gmail.com>
|
||||
Date: Thu, 8 Mar 2018 15:22:59 +0900
|
||||
Subject: [PATCH] core: do not free heap-allocated strings
|
||||
|
||||
Fixes #8387.
|
||||
---
|
||||
src/core/mount-setup.c | 6 ++++--
|
||||
1 file changed, 4 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/src/core/mount-setup.c b/src/core/mount-setup.c
|
||||
index 536c17b4d56..9c27972aff5 100644
|
||||
--- a/src/core/mount-setup.c
|
||||
+++ b/src/core/mount-setup.c
|
||||
@@ -248,6 +248,7 @@ int mount_setup_early(void) {
|
||||
|
||||
int mount_cgroup_controllers(char ***join_controllers) {
|
||||
_cleanup_set_free_free_ Set *controllers = NULL;
|
||||
+ bool has_argument = !!join_controllers;
|
||||
int r;
|
||||
|
||||
if (!cg_is_legacy_wanted())
|
||||
@@ -255,7 +256,7 @@ int mount_cgroup_controllers(char ***join_controllers) {
|
||||
|
||||
/* Mount all available cgroup controllers that are built into the kernel. */
|
||||
|
||||
- if (!join_controllers)
|
||||
+ if (!has_argument)
|
||||
/* The defaults:
|
||||
* mount "cpu" + "cpuacct" together, and "net_cls" + "net_prio".
|
||||
*
|
||||
@@ -300,7 +301,8 @@ int mount_cgroup_controllers(char ***join_controllers) {
|
||||
|
||||
t = set_remove(controllers, *i);
|
||||
if (!t) {
|
||||
- free(*i);
|
||||
+ if (has_argument)
|
||||
+ free(*i);
|
||||
continue;
|
||||
}
|
||||
}
|
@ -0,0 +1,38 @@
|
||||
https://github.com/systemd/systemd/pull/8872
|
||||
From 773c84349d80c7a6f818f5909a160ddb7337987f Mon Sep 17 00:00:00 2001
|
||||
From: Adam Duskett <Aduskett@gmail.com>
|
||||
Date: Wed, 2 May 2018 04:04:50 -0400
|
||||
Subject: [PATCH] add __nr_statx defines for extra architectures (#8872)
|
||||
|
||||
This includes:
|
||||
- arm
|
||||
- arm64
|
||||
- alpha
|
||||
- powerpc64
|
||||
- sparc
|
||||
|
||||
Taken from kernel 4.16.6
|
||||
---
|
||||
src/basic/missing_syscall.h | 8 +++++++-
|
||||
1 file changed, 7 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/basic/missing_syscall.h b/src/basic/missing_syscall.h
|
||||
index 2948f789b51..42ada30d524 100644
|
||||
--- a/src/basic/missing_syscall.h
|
||||
+++ b/src/basic/missing_syscall.h
|
||||
@@ -403,8 +403,14 @@ static inline int missing_bpf(int cmd, union bpf_attr *attr, size_t size) {
|
||||
|
||||
#if !HAVE_STATX
|
||||
# ifndef __NR_statx
|
||||
-# if defined __i386__
|
||||
+# if defined __aarch64__ || defined __arm__
|
||||
+# define __NR_statx 397
|
||||
+# elif defined __alpha__
|
||||
+# define __NR_statx 522
|
||||
+# elif defined __i386__ || defined __powerpc64__
|
||||
# define __NR_statx 383
|
||||
+# elif defined __sparc__
|
||||
+# define __NR_statx 360
|
||||
# elif defined __x86_64__
|
||||
# define __NR_statx 332
|
||||
# else
|
Loading…
x
Reference in New Issue
Block a user