summaryrefslogtreecommitdiff
path: root/src/nspawn
diff options
context:
space:
mode:
Diffstat (limited to 'src/nspawn')
-rw-r--r--src/nspawn/nspawn.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/nspawn/nspawn.c b/src/nspawn/nspawn.c
index b91b0b8a91..33153c9507 100644
--- a/src/nspawn/nspawn.c
+++ b/src/nspawn/nspawn.c
@@ -1220,6 +1220,7 @@ finish:
}
static bool audit_enabled(void) {
+#ifdef HAVE_AUDIT
int fd;
fd = socket(AF_NETLINK, SOCK_RAW, NETLINK_AUDIT);
@@ -1227,7 +1228,7 @@ static bool audit_enabled(void) {
close_nointr_nofail(fd);
return true;
}
-
+#endif
return false;
}