[systemd-devel] [PATCH 1/9] capabilities: remove spurious include of <sys/capability.h> from nspawn.c
Filipe Brandenburger
filbranden at google.com
Tue Dec 23 10:38:42 PST 2014
It does not use any functions from libcap directly. The CAP_* constants in use
through this file come from "missing.h" which will import <linux/capability.h>
and complement it with CAP_* constants not defined by the current kernel
headers.
Add an explicit import of our "capability.h" since it does use the function
capability_bounding_set_drop from that header file. Previously, that header was
implicitly imported through through "cap-list.h".
Tested that "systemd-nspawn" builds cleanly and works after this change.
---
src/nspawn/nspawn.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/nspawn/nspawn.c b/src/nspawn/nspawn.c
index 0dd12ad..04396eb 100644
--- a/src/nspawn/nspawn.c
+++ b/src/nspawn/nspawn.c
@@ -31,7 +31,6 @@
#include <stdio.h>
#include <errno.h>
#include <sys/prctl.h>
-#include <sys/capability.h>
#include <getopt.h>
#include <termios.h>
#include <sys/signalfd.h>
@@ -90,6 +89,7 @@
#include "base-filesystem.h"
#include "barrier.h"
#include "event-util.h"
+#include "capability.h"
#include "cap-list.h"
#include "btrfs-util.h"
--
1.8.3.1
More information about the systemd-devel
mailing list