chiark / gitweb /
nspawn: Include netlink headers rather than using #ifdef
authorColin Walters <walters@verbum.org>
Thu, 9 May 2013 23:31:20 +0000 (19:31 -0400)
committerColin Walters <walters@verbum.org>
Thu, 9 May 2013 23:31:20 +0000 (19:31 -0400)
This is a better fix than e13e1fad8b231e187bd5de3ce668411bdcd3ac1a for
failing to compile without audit that
77b6e19458f37cfde127ec6aa9494c0ac45ad890 introduced.

src/nspawn/nspawn.c

index 33153c950777b7591c64c35536cafbf4e4072336..95d76eb3c3f51bed2a9f6d472e62ce8d8a3f1d13 100644 (file)
@@ -39,6 +39,7 @@
 #include <sys/signalfd.h>
 #include <grp.h>
 #include <linux/fs.h>
 #include <sys/signalfd.h>
 #include <grp.h>
 #include <linux/fs.h>
+#include <linux/netlink.h>
 #include <sys/un.h>
 #include <sys/socket.h>
 
 #include <sys/un.h>
 #include <sys/socket.h>
 
@@ -1220,7 +1221,6 @@ finish:
 }
 
 static bool audit_enabled(void) {
 }
 
 static bool audit_enabled(void) {
-#ifdef HAVE_AUDIT
         int fd;
 
         fd = socket(AF_NETLINK, SOCK_RAW, NETLINK_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;
         }
                 close_nointr_nofail(fd);
                 return true;
         }
-#endif
         return false;
 }
 
         return false;
 }