linux-acpi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ACPICA: Fix compilation with bare-metal toolchian
@ 2019-06-22 21:03 Laster K.
  2019-07-05  9:43 ` Rafael J. Wysocki
  0 siblings, 1 reply; 3+ messages in thread
From: Laster K. @ 2019-06-22 21:03 UTC (permalink / raw)
  To: robert.moore, erik.schmauss, rafael.j.wysocki, lenb; +Cc: linux-acpi, devel

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@gmail.com>
---
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

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2019-12-13 20:38 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-06-22 21:03 [PATCH] ACPICA: Fix compilation with bare-metal toolchian Laster K.
2019-07-05  9:43 ` Rafael J. Wysocki
     [not found]   ` <94F2FBAB4432B54E8AACC7DFDE6C92E3B96BFE2C@ORSMSX110.amr.corp.intel.com>
2019-12-13 15:05     ` [Devel] " Jung-uk Kim

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).