]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
reboot-util: Make clang-tidy happy if xenctrl is not installed
authorDaan De Meyer <daan@amutable.com>
Fri, 20 Mar 2026 20:52:00 +0000 (21:52 +0100)
committerDaan De Meyer <daan@amutable.com>
Fri, 20 Mar 2026 20:52:00 +0000 (21:52 +0100)
xenctrl is another library that's not widely available across distributions.
Let's make sure clang-tidy is happy with reboot-util.c if it is not
available.

src/shared/reboot-util.c

index 948e15631d8ab08e05125e6320968ec26c3ce41e..55ec6c0f0aac63bda97b5cf4c498b32e872b2cbe 100644 (file)
@@ -1,21 +1,23 @@
 /* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <stdint.h>
-#include <sys/ioctl.h>
-#include <sys/mman.h>
 #include <sys/syscall.h>
 #include <unistd.h>
 
 #if HAVE_XENCTRL
+#include <sys/ioctl.h>
+#include <sys/mman.h>
+
 #define __XEN_INTERFACE_VERSION__ 0x00040900
 #include <xen/kexec.h>
 #include <xen/sys/privcmd.h>
 #include <xen/xen.h>
-#endif
 
-#include "alloc-util.h"
 #include "errno-util.h"
 #include "fd-util.h"
+#endif
+
+#include "alloc-util.h"
 #include "fileio.h"
 #include "log.h"
 #include "proc-cmdline.h"