xl: avoid shadowing reboot(2)
authorChristoph Egger <Christoph.Egger@amd.com>
Thu, 25 Oct 2012 11:51:25 +0000 (12:51 +0100)
committerChristoph Egger <Christoph.Egger@amd.com>
Thu, 25 Oct 2012 11:51:25 +0000 (12:51 +0100)
On NetBSD <unistd.h> mistakenly exposes reboot(2).  Work around this.

Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
tools/libxl/xl_cmdimpl.c

index dc805958898945ab741064a18e222cf304a4856e..92ac0c3751b141919e29842836892e633c16aeab 100644 (file)
@@ -3721,11 +3721,11 @@ int main_destroy(int argc, char **argv)
     return 0;
 }
 
-static int main_shutdown_or_reboot(int reboot, int argc, char **argv)
+static int main_shutdown_or_reboot(int do_reboot, int argc, char **argv)
 {
     void (*fn)(uint32_t domid,
                libxl_evgen_domain_death **, libxl_ev_user, int) =
-        reboot ? &reboot_domain : &shutdown_domain;
+        do_reboot ? &reboot_domain : &shutdown_domain;
     int opt, i, nb_domain;
     int wait_for_it = 0, all =0;
     int fallback_trigger = 0;