about summary refs log tree commit diff
diff options
context:
space:
mode:
authorLeah Neukirchen <leah@vuxu.org>2024-01-09 16:50:55 +0100
committerLeah Neukirchen <leah@vuxu.org>2024-01-09 16:50:55 +0100
commitc44e8ac96d390d510818e47f0686e456b600b70b (patch)
tree5e2df0ae38bbd8c3346464e4e31910858e4130ae
parent02992f086029b8781d0ada2a7c941c78dc3cadba (diff)
downloadnitro-c44e8ac96d390d510818e47f0686e456b600b70b.tar.gz
nitro-c44e8ac96d390d510818e47f0686e456b600b70b.tar.xz
nitro-c44e8ac96d390d510818e47f0686e456b600b70b.zip
nitroctl: only include utmp when needed
-rw-r--r--nitroctl.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/nitroctl.c b/nitroctl.c
index 7cc06a4..29c8963 100644
--- a/nitroctl.c
+++ b/nitroctl.c
@@ -6,9 +6,6 @@
 #include <sys/time.h>
 #include <sys/un.h>
 #include <sys/utsname.h>
-#ifdef INIT_SYSTEM
-#include <sys/reboot.h>
-#endif
 
 #include <ctype.h>
 #include <errno.h>
@@ -21,7 +18,11 @@
 #include <string.h>
 #include <time.h>
 #include <unistd.h>
+
+#ifdef INIT_SYSTEM
+#include <sys/reboot.h>
 #include <utmp.h>
+#endif
 
 int connfd;
 const char *sockpath;