aboutsummaryrefslogtreecommitdiffstats
path: root/include/acpi/platform/aclinux.h
diff options
context:
space:
mode:
authorLv Zheng <lv.zheng@intel.com>2016-08-04 16:44:44 +0800
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2016-08-13 03:09:34 +0200
commitda24f31d33dd18c622bb4f21791565ab9b6421db (patch)
tree72ca6c82255d9ac687c5de4065f9dff3968c6db3 /include/acpi/platform/aclinux.h
parentACPICA: Clib: Cleanup va_arg related code (diff)
downloadlinux-dev-da24f31d33dd18c622bb4f21791565ab9b6421db.tar.xz
linux-dev-da24f31d33dd18c622bb4f21791565ab9b6421db.zip
ACPICA: Clib: Fix wrong mini C library usage
ACPICA commit 4aab18466b56f3660f27cffd3c0160900737f844 When mini C library is used, we should have the following macros undefined. The only user should be the EFI applications: ACPI_USE_SYSTEM_CLIBRARY=n ACPI_USE_STANDARD_HEADERS=n All other applications uses the compiler specific library: ACPI_USE_SYSTEM_CLIBRARY=y ACPI_USE_STANDARD_HEADERS=y Linux/BSD kernels are the kind of hosts providing C library but does not provide the standard headers: ACPI_USE_SYSTEM_CLIBRARY=y ACPI_USE_STANDARD_HEADERS=n But the above logic hasn't been synchronized between the header files. This patch synchronizes all header files to correct C library usages for different platforms. This patch moves all ACPI_USE_SYSTEM_CLIRARY and ACPI_USE_STANDARD_HEADERS to the top most lines of a platform specific header. After synchronization, ACPI_USE_SYSTEM_CLIRARY definition can be removed for ACPI_APPLICATION. Lv Zheng. Link: https://github.com/acpica/acpica/commit/4aab1846 Link: https://bugs.acpica.org/show_bug.cgi?id=1299 Signed-off-by: Lv Zheng <lv.zheng@intel.com> Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'include/acpi/platform/aclinux.h')
-rw-r--r--include/acpi/platform/aclinux.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/include/acpi/platform/aclinux.h b/include/acpi/platform/aclinux.h
index 447c33f303b0..1380ec7035f8 100644
--- a/include/acpi/platform/aclinux.h
+++ b/include/acpi/platform/aclinux.h
@@ -180,10 +180,11 @@
#else /* !__KERNEL__ */
-#include <string.h>
-#include <stdlib.h>
-#include <ctype.h>
+#define ACPI_USE_STANDARD_HEADERS
+
+#ifdef ACPI_USE_STANDARD_HEADERS
#include <unistd.h>
+#endif
/* Define/disable kernel-specific declarators */