[systemd-devel] [PATCH 4/9] capabilities: remove spurious include of <sys/capability.h> from hostnamed.c

Filipe Brandenburger filbranden at google.com
Tue Dec 23 10:38:45 PST 2014


It does not use any functions from libcap directly. The CAP_SYS_ADMIN constant
in use by this file comes from <linux/capability.h> imported through "missing.h".

Tested that "systemd-hostnamed" builds cleanly and works after this change.
---
 src/hostname/hostnamed.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/src/hostname/hostnamed.c b/src/hostname/hostnamed.c
index ef45e56..b230ff6 100644
--- a/src/hostname/hostnamed.c
+++ b/src/hostname/hostnamed.c
@@ -23,7 +23,6 @@
 #include <string.h>
 #include <unistd.h>
 #include <sys/utsname.h>
-#include <sys/capability.h>
 
 #include "util.h"
 #include "strv.h"
-- 
1.8.3.1



More information about the systemd-devel mailing list