An ifdef expects to be compiled with full-fledged Linux toolchain, but it's common to compile kernel with just bare-metal toolchain which doesn't define __linux__. So, also add __KERNEL__ check. Signed-off-by: Laster K. (lazerl0rd) <officiallazerl0rd@xxxxxxxxx> --- Apologies for the multiple/spammed e-mails, I was having mail client issues. include/acpi/platform/acenv.h | 2 +- include/acpi/platform/acenvex.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/include/acpi/platform/acenv.h b/include/acpi/platform/acenv.h index 35ab3f87cc29..b69319198cb8 100644 --- a/include/acpi/platform/acenv.h +++ b/include/acpi/platform/acenv.h @@ -148,7 +148,7 @@ #endif -#if defined(_LINUX) || defined(__linux__) +#if defined(_LINUX) || defined(__KERNEL__) || defined(__linux__) #include <acpi/platform/aclinux.h> #elif defined(_APPLE) || defined(__APPLE__) diff --git a/include/acpi/platform/acenvex.h b/include/acpi/platform/acenvex.h index 2e36c8344897..c7697a47e33f 100644 --- a/include/acpi/platform/acenvex.h +++ b/include/acpi/platform/acenvex.h @@ -19,7 +19,7 @@ * *****************************************************************************/ -#if defined(_LINUX) || defined(__linux__) +#if defined(_LINUX) || defined(__KERNEL__) || defined(__linux__) #include <acpi/platform/aclinuxex.h> #elif defined(__DragonFly__) -- 2.17.1