Commit 9890e912 authored by Tobias Stoeckmann's avatar Tobias Stoeckmann Committed by Adam Jackson
Browse files

hw/xfree86: Support ACPI without APM.

On systems with ACPI but disabled APM (e.g. --disable-linux-apm)
the code does not compile due to preprocessor directives.

If APM is disabled, the final return statement is considered to
be part of ACPI's last if-statement, leading to a function which
has no final return statement at all.

I have refactored the code so ACPI and APM are independent of each
Signed-off-by: Tobias Stoeckmann's avatarTobias Stoeckmann <>
parent 785e5906
......@@ -138,10 +138,11 @@ xf86OSPMOpen(void)
#ifdef HAVE_ACPI
/* Favour ACPI over APM, but only when enabled */
if (!xf86acpiDisableFlag)
if (!xf86acpiDisableFlag) {
ret = lnxACPIOpen();
if (!ret)
if (ret)
return ret;
#ifdef HAVE_APM
ret = lnxAPMOpen();
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment