ACPICA: Fix failed target detection with bare-metal compiler
The target environment macro checks in ACPICA fail when the compiler targets bare-metal environments (i.e. plain ELF images) instead of Linux userspace environments. The predefined __linux__ macro is not defined in such cases, but this is all ACPICA checks for. Not being able to detect the target environment causes hundreds of compile errors to be emitted due to missing definitions, because those definitions are normally in target-specific headers. Fix the issue by using the proper method of detecting whether code is being compiled as part of the kernel (__KERNEL__) in the ACPICA target environment detection header, thus resulting in the appropriate target headers being included. Signed-off-by: Danny Lin <danny@kdrag0n.dev> Signed-off-by: Panchajanya1999 <panchajanya@azure-dev.live> Signed-off-by: UtsavBalar1231 <utsavbalar1231@gmail.com>
This commit is contained in:
committed by
UtsavBalar1231
parent
bc3dc4edf2
commit
8302aa7846
@@ -182,7 +182,7 @@
|
||||
|
||||
#endif
|
||||
|
||||
#if defined(_LINUX) || defined(__linux__)
|
||||
#if defined(_LINUX) || defined(__linux__) || defined(__KERNEL__)
|
||||
#include <acpi/platform/aclinux.h>
|
||||
|
||||
#elif defined(_APPLE) || defined(__APPLE__)
|
||||
|
||||
@@ -53,7 +53,7 @@
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
#if defined(_LINUX) || defined(__linux__)
|
||||
#if defined(_LINUX) || defined(__linux__) || defined(__KERNEL__)
|
||||
#include <acpi/platform/aclinuxex.h>
|
||||
|
||||
#elif defined(__DragonFly__)
|
||||
|
||||
Reference in New Issue
Block a user