diff --git a/src/libxl/libxl_api_wrapper.h b/src/libxl/libxl_api_wrapper.h index 8b25c3fc9e..6744ba7db3 100644 --- a/src/libxl/libxl_api_wrapper.h +++ b/src/libxl/libxl_api_wrapper.h @@ -72,3 +72,17 @@ libxlDomainShutdownWrapper(libxl_ctx *ctx, uint32_t domid) return ret; } + +static inline int +libxlDomainRebootWrapper(libxl_ctx *ctx, uint32_t domid) +{ + int ret; + +#if LIBXL_API_VERSION < 0x041300 + ret = libxl_domain_reboot(ctx, domid); +#else + ret = libxl_domain_reboot(ctx, domid, NULL); +#endif + + return ret; +} diff --git a/src/libxl/libxl_driver.c b/src/libxl/libxl_driver.c index 0a0881c133..060dbbbebe 100644 --- a/src/libxl/libxl_driver.c +++ b/src/libxl/libxl_driver.c @@ -1356,7 +1356,7 @@ libxlDomainReboot(virDomainPtr dom, unsigned int flags) goto cleanup; if (flags & VIR_DOMAIN_REBOOT_PARAVIRT) { - ret = libxl_domain_reboot(cfg->ctx, vm->def->id); + ret = libxlDomainRebootWrapper(cfg->ctx, vm->def->id); if (ret == 0) goto cleanup;