|
Zbigniew Jędrzejewski-Szmek |
b05aec |
From 227b8a762fea1458547be2cdf0e6e4aac0079730 Mon Sep 17 00:00:00 2001
|
|
Zbigniew Jędrzejewski-Szmek |
b05aec |
From: Michael Olbrich <m.olbrich@pengutronix.de>
|
|
Zbigniew Jędrzejewski-Szmek |
b05aec |
Date: Mon, 26 Mar 2018 17:34:53 +0200
|
|
Zbigniew Jędrzejewski-Szmek |
b05aec |
Subject: [PATCH] core: don't include libmount.h in a header file (#8580)
|
|
Zbigniew Jędrzejewski-Szmek |
b05aec |
|
|
Zbigniew Jędrzejewski-Szmek |
b05aec |
linux/fs.h sys/mount.h, libmount.h and missing.h all include MS_*
|
|
Zbigniew Jędrzejewski-Szmek |
b05aec |
definitions.
|
|
Zbigniew Jędrzejewski-Szmek |
b05aec |
|
|
Zbigniew Jędrzejewski-Szmek |
b05aec |
To avoid problems, only one of linux/fs.h, sys/mount.h and libmount.h
|
|
Zbigniew Jędrzejewski-Szmek |
b05aec |
should be included. And missing.h must be included last.
|
|
Zbigniew Jędrzejewski-Szmek |
b05aec |
|
|
Zbigniew Jędrzejewski-Szmek |
b05aec |
Without this, building systemd may fail with:
|
|
Zbigniew Jędrzejewski-Szmek |
b05aec |
|
|
Zbigniew Jędrzejewski-Szmek |
b05aec |
In file included from [...]/libmount/libmount.h:31:0,
|
|
Zbigniew Jędrzejewski-Szmek |
b05aec |
from ../systemd-238/src/core/manager.h:23,
|
|
Zbigniew Jędrzejewski-Szmek |
b05aec |
from ../systemd-238/src/core/emergency-action.h:37,
|
|
Zbigniew Jędrzejewski-Szmek |
b05aec |
from ../systemd-238/src/core/unit.h:34,
|
|
Zbigniew Jędrzejewski-Szmek |
b05aec |
from ../systemd-238/src/core/dbus-timer.h:25,
|
|
Zbigniew Jędrzejewski-Szmek |
b05aec |
from ../systemd-238/src/core/timer.c:26:
|
|
Zbigniew Jędrzejewski-Szmek |
b05aec |
[...]/sys/mount.h:57:2: error: expected identifier before numeric constant
|
|
Zbigniew Jędrzejewski-Szmek |
b05aec |
---
|
|
Zbigniew Jędrzejewski-Szmek |
b05aec |
src/core/dbus-execute.c | 1 +
|
|
Zbigniew Jędrzejewski-Szmek |
b05aec |
src/core/manager.h | 3 ++-
|
|
Zbigniew Jędrzejewski-Szmek |
b05aec |
src/core/mount.c | 2 ++
|
|
Zbigniew Jędrzejewski-Szmek |
b05aec |
3 files changed, 5 insertions(+), 1 deletion(-)
|
|
Zbigniew Jędrzejewski-Szmek |
b05aec |
|
|
Zbigniew Jędrzejewski-Szmek |
b05aec |
diff --git a/src/core/dbus-execute.c b/src/core/dbus-execute.c
|
|
Zbigniew Jędrzejewski-Szmek |
b05aec |
index 7344623ebf..c342093bca 100644
|
|
Zbigniew Jędrzejewski-Szmek |
b05aec |
--- a/src/core/dbus-execute.c
|
|
Zbigniew Jędrzejewski-Szmek |
b05aec |
+++ b/src/core/dbus-execute.c
|
|
Zbigniew Jędrzejewski-Szmek |
b05aec |
@@ -18,6 +18,7 @@
|
|
Zbigniew Jędrzejewski-Szmek |
b05aec |
along with systemd; If not, see <http://www.gnu.org/licenses/>.
|
|
Zbigniew Jędrzejewski-Szmek |
b05aec |
***/
|
|
Zbigniew Jędrzejewski-Szmek |
b05aec |
|
|
Zbigniew Jędrzejewski-Szmek |
b05aec |
+#include <sys/mount.h>
|
|
Zbigniew Jędrzejewski-Szmek |
b05aec |
#include <sys/prctl.h>
|
|
Zbigniew Jędrzejewski-Szmek |
b05aec |
#include <stdio_ext.h>
|
|
Zbigniew Jędrzejewski-Szmek |
b05aec |
|
|
Zbigniew Jędrzejewski-Szmek |
b05aec |
diff --git a/src/core/manager.h b/src/core/manager.h
|
|
Zbigniew Jędrzejewski-Szmek |
b05aec |
index 28c5da225b..e09e0cdf5e 100644
|
|
Zbigniew Jędrzejewski-Szmek |
b05aec |
--- a/src/core/manager.h
|
|
Zbigniew Jędrzejewski-Szmek |
b05aec |
+++ b/src/core/manager.h
|
|
Zbigniew Jędrzejewski-Szmek |
b05aec |
@@ -20,7 +20,6 @@
|
|
Zbigniew Jędrzejewski-Szmek |
b05aec |
along with systemd; If not, see <http://www.gnu.org/licenses/>.
|
|
Zbigniew Jędrzejewski-Szmek |
b05aec |
***/
|
|
Zbigniew Jędrzejewski-Szmek |
b05aec |
|
|
Zbigniew Jędrzejewski-Szmek |
b05aec |
-#include <libmount.h>
|
|
Zbigniew Jędrzejewski-Szmek |
b05aec |
#include <stdbool.h>
|
|
Zbigniew Jędrzejewski-Szmek |
b05aec |
#include <stdio.h>
|
|
Zbigniew Jędrzejewski-Szmek |
b05aec |
|
|
Zbigniew Jędrzejewski-Szmek |
b05aec |
@@ -34,6 +33,8 @@
|
|
Zbigniew Jędrzejewski-Szmek |
b05aec |
#include "list.h"
|
|
Zbigniew Jędrzejewski-Szmek |
b05aec |
#include "ratelimit.h"
|
|
Zbigniew Jędrzejewski-Szmek |
b05aec |
|
|
Zbigniew Jędrzejewski-Szmek |
b05aec |
+struct libmnt_monitor;
|
|
Zbigniew Jędrzejewski-Szmek |
b05aec |
+
|
|
Zbigniew Jędrzejewski-Szmek |
b05aec |
/* Enforce upper limit how many names we allow */
|
|
Zbigniew Jędrzejewski-Szmek |
b05aec |
#define MANAGER_MAX_NAMES 131072 /* 128K */
|
|
Zbigniew Jędrzejewski-Szmek |
b05aec |
|
|
Zbigniew Jędrzejewski-Szmek |
b05aec |
diff --git a/src/core/mount.c b/src/core/mount.c
|
|
Zbigniew Jędrzejewski-Szmek |
b05aec |
index 0e755da5c0..0154ebda5d 100644
|
|
Zbigniew Jędrzejewski-Szmek |
b05aec |
--- a/src/core/mount.c
|
|
Zbigniew Jędrzejewski-Szmek |
b05aec |
+++ b/src/core/mount.c
|
|
Zbigniew Jędrzejewski-Szmek |
b05aec |
@@ -23,6 +23,8 @@
|
|
Zbigniew Jędrzejewski-Szmek |
b05aec |
#include <stdio.h>
|
|
Zbigniew Jędrzejewski-Szmek |
b05aec |
#include <sys/epoll.h>
|
|
Zbigniew Jędrzejewski-Szmek |
b05aec |
|
|
Zbigniew Jędrzejewski-Szmek |
b05aec |
+#include <libmount.h>
|
|
Zbigniew Jędrzejewski-Szmek |
b05aec |
+
|
|
Zbigniew Jędrzejewski-Szmek |
b05aec |
#include "sd-messages.h"
|
|
Zbigniew Jędrzejewski-Szmek |
b05aec |
|
|
Zbigniew Jędrzejewski-Szmek |
b05aec |
#include "alloc-util.h"
|