From b05aec5ee061a608609ecdfb8142a91901dedc28 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= Date: Wed, 28 Mar 2018 09:39:33 +0200 Subject: [PATCH] Add patch to fix build on rawhide --- ...ude-libmount.h-in-a-header-file-8580.patch | 72 +++++++++++++++++++ systemd.spec | 3 +- 2 files changed, 74 insertions(+), 1 deletion(-) create mode 100644 0005-core-don-t-include-libmount.h-in-a-header-file-8580.patch diff --git a/0005-core-don-t-include-libmount.h-in-a-header-file-8580.patch b/0005-core-don-t-include-libmount.h-in-a-header-file-8580.patch new file mode 100644 index 0000000..a40d12e --- /dev/null +++ b/0005-core-don-t-include-libmount.h-in-a-header-file-8580.patch @@ -0,0 +1,72 @@ +From 227b8a762fea1458547be2cdf0e6e4aac0079730 Mon Sep 17 00:00:00 2001 +From: Michael Olbrich +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 7344623ebf..c342093bca 100644 +--- a/src/core/dbus-execute.c ++++ b/src/core/dbus-execute.c +@@ -18,6 +18,7 @@ + along with systemd; If not, see . + ***/ + ++#include + #include + #include + +diff --git a/src/core/manager.h b/src/core/manager.h +index 28c5da225b..e09e0cdf5e 100644 +--- a/src/core/manager.h ++++ b/src/core/manager.h +@@ -20,7 +20,6 @@ + along with systemd; If not, see . + ***/ + +-#include + #include + #include + +@@ -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 0e755da5c0..0154ebda5d 100644 +--- a/src/core/mount.c ++++ b/src/core/mount.c +@@ -23,6 +23,8 @@ + #include + #include + ++#include ++ + #include "sd-messages.h" + + #include "alloc-util.h" diff --git a/systemd.spec b/systemd.spec index 2dc225c..7e6f955 100644 --- a/systemd.spec +++ b/systemd.spec @@ -51,7 +51,8 @@ GIT_DIR=../../src/systemd/.git git diffab -M v233..master@{2017-06-15} -- hwdb/[ Patch0001: 0001-test-cgroup-util-bail-out-when-running-under-mock.patch Patch0002: 0002-basic-fs-util-skip-fsync_directory_of_file-if-proc-s.patch Patch0003: 0003-core-when-reloading-delay-any-actions-on-journal-and.patch -Patch0004: 0004-udev-net-id-Fix-check-for-address-to-keep-interface-.patch +Patch0004: 0004-udev-net-id-Fix-check-for-address-to-keep-interface-.patch +Patch0005: 0005-core-don-t-include-libmount.h-in-a-header-file-8580.patch Patch0998: 0998-resolved-create-etc-resolv.conf-symlink-at-runtime.patch