summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorColin Walters <walters@verbum.org>2013-05-09 19:31:20 -0400
committerColin Walters <walters@verbum.org>2013-05-09 19:31:20 -0400
commit2e996f4d4b642c5682c608c9692ad2ffae398ab2 (patch)
treec7060a4072c8a9839dbc80a6f37992fd9061d221
parente13e1fad8b231e187bd5de3ce668411bdcd3ac1a (diff)
nspawn: Include netlink headers rather than using #ifdef
This is a better fix than e13e1fad8b231e187bd5de3ce668411bdcd3ac1a for failing to compile without audit that 77b6e19458f37cfde127ec6aa9494c0ac45ad890 introduced.
-rw-r--r--src/nspawn/nspawn.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/nspawn/nspawn.c b/src/nspawn/nspawn.c
index 33153c9507..95d76eb3c3 100644
--- a/src/nspawn/nspawn.c
+++ b/src/nspawn/nspawn.c
@@ -39,6 +39,7 @@
#include <sys/signalfd.h>
#include <grp.h>
#include <linux/fs.h>
+#include <linux/netlink.h>
#include <sys/un.h>
#include <sys/socket.h>
@@ -1220,7 +1221,6 @@ finish:
}
static bool audit_enabled(void) {
-#ifdef HAVE_AUDIT
int fd;
fd = socket(AF_NETLINK, SOCK_RAW, NETLINK_AUDIT);
@@ -1228,7 +1228,6 @@ static bool audit_enabled(void) {
close_nointr_nofail(fd);
return true;
}
-#endif
return false;
}