aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2018-01-27 12:03:22 -0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2018-01-29 23:05:11 +0000
commitcf4fc7804f093f5b570eaeaa39cb5dce5db1e379 (patch)
tree7cc4e85be76258177f8086c253c5b1b1553ce8ea
parent8f893588ff42db711763d0a8977b733df8389774 (diff)
downloadopenembedded-core-contrib-cf4fc7804f093f5b570eaeaa39cb5dce5db1e379.tar.gz
systemd: Fix build with glibc 2.27
Signed-off-by: Khem Raj <raj.khem@gmail.com>
-rw-r--r--meta/recipes-core/systemd/systemd/0001-core-device.c-Change-the-default-device-timeout-to-2.patch7
-rw-r--r--meta/recipes-core/systemd/systemd/0001-meson-update-header-file-to-detect-memfd_create.patch28
-rw-r--r--meta/recipes-core/systemd/systemd/0002-configure.ac-Check-if-memfd_create-is-already-define.patch27
-rw-r--r--meta/recipes-core/systemd/systemd/0003-fileio-include-sys-mman.h.patch26
-rw-r--r--meta/recipes-core/systemd/systemd_234.bb3
5 files changed, 87 insertions, 4 deletions
diff --git a/meta/recipes-core/systemd/systemd/0001-core-device.c-Change-the-default-device-timeout-to-2.patch b/meta/recipes-core/systemd/systemd/0001-core-device.c-Change-the-default-device-timeout-to-2.patch
index 7f1bc447fed..b7b1ea08861 100644
--- a/meta/recipes-core/systemd/systemd/0001-core-device.c-Change-the-default-device-timeout-to-2.patch
+++ b/meta/recipes-core/systemd/systemd/0001-core-device.c-Change-the-default-device-timeout-to-2.patch
@@ -1,8 +1,7 @@
-From f1b5a6f717bda6f80a6b5e3e4d50b450f6cc7b09 Mon Sep 17 00:00:00 2001
+From 9820c165a9e559cf851e3beb60fad2571de4ded2 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Mon, 14 Dec 2015 04:09:19 +0000
-Subject: [PATCH 14/14] core/device.c: Change the default device timeout to 240
- sec.
+Subject: [PATCH] core/device.c: Change the default device timeout to 240 sec.
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
@@ -30,5 +29,5 @@ index 77601c552..98bf49ba2 100644
u->ignore_on_isolate = true;
}
--
-2.13.2
+2.16.1
diff --git a/meta/recipes-core/systemd/systemd/0001-meson-update-header-file-to-detect-memfd_create.patch b/meta/recipes-core/systemd/systemd/0001-meson-update-header-file-to-detect-memfd_create.patch
new file mode 100644
index 00000000000..c6431209d06
--- /dev/null
+++ b/meta/recipes-core/systemd/systemd/0001-meson-update-header-file-to-detect-memfd_create.patch
@@ -0,0 +1,28 @@
+From 2207e1ffe4f7e2dcc5e745dadb48738aa1048d63 Mon Sep 17 00:00:00 2001
+From: Yu Watanabe <watanabe.yu+github@gmail.com>
+Date: Sun, 26 Nov 2017 02:17:06 +0900
+Subject: [PATCH 1/3] meson: update header file to detect memfd_create()
+
+---
+Upstream-Status: Backport
+
+ meson.build | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/meson.build b/meson.build
+index 20b27c860..550dd4ad8 100644
+--- a/meson.build
++++ b/meson.build
+@@ -414,7 +414,8 @@ foreach ident : ['secure_getenv', '__secure_getenv']
+ endforeach
+
+ foreach ident : [
+- ['memfd_create', '''#include <sys/memfd.h>'''],
++ ['memfd_create', '''#define _GNU_SOURCE
++ #include <sys/mman.h>'''],
+ ['gettid', '''#include <sys/types.h>'''],
+ ['pivot_root', '''#include <stdlib.h>'''], # no known header declares pivot_root
+ ['name_to_handle_at', '''#define _GNU_SOURCE
+--
+2.16.1
+
diff --git a/meta/recipes-core/systemd/systemd/0002-configure.ac-Check-if-memfd_create-is-already-define.patch b/meta/recipes-core/systemd/systemd/0002-configure.ac-Check-if-memfd_create-is-already-define.patch
new file mode 100644
index 00000000000..da798a79a3c
--- /dev/null
+++ b/meta/recipes-core/systemd/systemd/0002-configure.ac-Check-if-memfd_create-is-already-define.patch
@@ -0,0 +1,27 @@
+From 025408c87869962f511de044dd41a1f4b1d80165 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Sat, 27 Jan 2018 11:53:38 -0800
+Subject: [PATCH 2/3] configure.ac: Check if memfd_create is already defined
+
+Upstream-Status: Inappropriate [upstream systemd uses meson]
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ configure.ac | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/configure.ac b/configure.ac
+index 3674190fb..c7a184d72 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -340,6 +340,7 @@ AC_CHECK_DECLS([
+ [], [], [[
+ #include <sys/types.h>
+ #include <unistd.h>
++#include <sys/mman.h>
+ #include <sys/mount.h>
+ #include <fcntl.h>
+ #include <sched.h>
+--
+2.16.1
+
diff --git a/meta/recipes-core/systemd/systemd/0003-fileio-include-sys-mman.h.patch b/meta/recipes-core/systemd/systemd/0003-fileio-include-sys-mman.h.patch
new file mode 100644
index 00000000000..c466d0d87b8
--- /dev/null
+++ b/meta/recipes-core/systemd/systemd/0003-fileio-include-sys-mman.h.patch
@@ -0,0 +1,26 @@
+From 52e922343faaa87b9efb8aa9ea578399ccc9bec9 Mon Sep 17 00:00:00 2001
+From: Yu Watanabe <watanabe.yu+github@gmail.com>
+Date: Sun, 26 Nov 2017 02:40:23 +0900
+Subject: [PATCH 3/3] fileio: include sys/mman.h
+
+---
+Upstream-Status: Backport
+
+ src/basic/fileio.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/src/basic/fileio.c b/src/basic/fileio.c
+index 9a185e3e6..1015afd29 100644
+--- a/src/basic/fileio.c
++++ b/src/basic/fileio.c
+@@ -24,6 +24,7 @@
+ #include <stdint.h>
+ #include <stdlib.h>
+ #include <string.h>
++#include <sys/mman.h>
+ #include <sys/stat.h>
+ #include <sys/types.h>
+ #include <unistd.h>
+--
+2.16.1
+
diff --git a/meta/recipes-core/systemd/systemd_234.bb b/meta/recipes-core/systemd/systemd_234.bb
index 4132cdf40f7..d12e94f463c 100644
--- a/meta/recipes-core/systemd/systemd_234.bb
+++ b/meta/recipes-core/systemd/systemd_234.bb
@@ -48,6 +48,9 @@ SRC_URI = "git://github.com/systemd/systemd.git;protocol=git \
file://0001-Use-uintmax_t-for-handling-rlim_t.patch \
file://0001-core-evaluate-presets-after-generators-have-run-6526.patch \
file://0001-main-skip-many-initialization-steps-when-running-in-.patch \
+ file://0001-meson-update-header-file-to-detect-memfd_create.patch \
+ file://0002-configure.ac-Check-if-memfd_create-is-already-define.patch \
+ file://0003-fileio-include-sys-mman.h.patch \
"
SRC_URI_append_qemuall = " file://0001-core-device.c-Change-the-default-device-timeout-to-2.patch"