summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRoss Burton <ross.burton@intel.com>2018-05-10 12:06:19 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2018-05-11 07:49:31 +0100
commit12b4fc15f6919d7573bea5d913fb805993e8640a (patch)
treea54e404a2af94cde73a347054ef874d7e0ee03ae
parent4f68722e37d28b5fdd30409570405bf65445eef2 (diff)
downloadopenembedded-core-contrib-12b4fc15f6919d7573bea5d913fb805993e8640a.tar.gz
openembedded-core-contrib-12b4fc15f6919d7573bea5d913fb805993e8640a.tar.bz2
openembedded-core-contrib-12b4fc15f6919d7573bea5d913fb805993e8640a.zip
systemd: fix build with util-linux 2.32
Signed-off-by: Ross Burton <ross.burton@intel.com>
-rw-r--r--meta/recipes-core/systemd/systemd/libmount.patch75
-rw-r--r--meta/recipes-core/systemd/systemd_237.bb1
2 files changed, 76 insertions, 0 deletions
diff --git a/meta/recipes-core/systemd/systemd/libmount.patch b/meta/recipes-core/systemd/systemd/libmount.patch
new file mode 100644
index 0000000000..b59d5b7d70
--- /dev/null
+++ b/meta/recipes-core/systemd/systemd/libmount.patch
@@ -0,0 +1,75 @@
+Upstream-Status: Backport
+Signed-off-by: Ross Burton <ross.burton@intel.com>
+
+From 227b8a762fea1458547be2cdf0e6e4aac0079730 Mon Sep 17 00:00:00 2001
+From: Michael Olbrich <m.olbrich@pengutronix.de>
+Date: Mon, 26 Mar 2018 17:34:53 +0200
+Subject: [PATCH] core: don't include libmount.h in a header file (#8580)
+
+linux/fs.h sys/mount.h, libmount.h and missing.h all include MS_*
+definitions.
+
+To avoid problems, only one of linux/fs.h, sys/mount.h and libmount.h
+should be included. And missing.h must be included last.
+
+Without this, building systemd may fail with:
+
+In file included from [...]/libmount/libmount.h:31:0,
+ from ../systemd-238/src/core/manager.h:23,
+ from ../systemd-238/src/core/emergency-action.h:37,
+ from ../systemd-238/src/core/unit.h:34,
+ from ../systemd-238/src/core/dbus-timer.h:25,
+ from ../systemd-238/src/core/timer.c:26:
+[...]/sys/mount.h:57:2: error: expected identifier before numeric constant
+---
+ src/core/dbus-execute.c | 1 +
+ src/core/manager.h | 3 ++-
+ src/core/mount.c | 2 ++
+ 3 files changed, 5 insertions(+), 1 deletion(-)
+
+diff --git a/src/core/dbus-execute.c b/src/core/dbus-execute.c
+index 7344623ebf6..c342093bca4 100644
+--- a/src/core/dbus-execute.c
++++ b/src/core/dbus-execute.c
+@@ -18,6 +18,7 @@
+ along with systemd; If not, see <http://www.gnu.org/licenses/>.
+ ***/
+
++#include <sys/mount.h>
+ #include <sys/prctl.h>
+ #include <stdio_ext.h>
+
+diff --git a/src/core/manager.h b/src/core/manager.h
+index 28c5da225b1..e09e0cdf5e9 100644
+--- a/src/core/manager.h
++++ b/src/core/manager.h
+@@ -20,7 +20,6 @@
+ along with systemd; If not, see <http://www.gnu.org/licenses/>.
+ ***/
+
+-#include <libmount.h>
+ #include <stdbool.h>
+ #include <stdio.h>
+
+@@ -34,6 +33,8 @@
+ #include "list.h"
+ #include "ratelimit.h"
+
++struct libmnt_monitor;
++
+ /* Enforce upper limit how many names we allow */
+ #define MANAGER_MAX_NAMES 131072 /* 128K */
+
+diff --git a/src/core/mount.c b/src/core/mount.c
+index 0e755da5c02..0154ebda5d6 100644
+--- a/src/core/mount.c
++++ b/src/core/mount.c
+@@ -23,6 +23,8 @@
+ #include <stdio.h>
+ #include <sys/epoll.h>
+
++#include <libmount.h>
++
+ #include "sd-messages.h"
+
+ #include "alloc-util.h"
diff --git a/meta/recipes-core/systemd/systemd_237.bb b/meta/recipes-core/systemd/systemd_237.bb
index 6f59e6064e..b7c2113255 100644
--- a/meta/recipes-core/systemd/systemd_237.bb
+++ b/meta/recipes-core/systemd/systemd_237.bb
@@ -51,6 +51,7 @@ SRC_URI += "file://touchscreen.rules \
file://0031-fix-missing-ULONG_LONG_MAX-definition-in-case-of-mus.patch \
file://0032-memfd.patch \
file://0033-basic-macros-rename-noreturn-into-_noreturn_-8456.patch \
+ file://libmount.patch \
"
SRC_URI_append_qemuall = " file://0001-core-device.c-Change-the-default-device-timeout-to-2.patch"