From 0e772872090ea703a24e3afbfa1eb5abcace7f32 Mon Sep 17 00:00:00 2001 From: Raghu Gandham Date: Tue, 25 Sep 2012 17:49:17 -0700 Subject: [PATCH] Replace __unused in kernel headers with __linux_unused to avoid conflicts with __unused macro in sys/cdefs.h Change-Id: Ice664397e0b7c7a90795012f30be5e43a9675525 --- libc/kernel/arch-arm/asm/ucontext.h | 2 +- libc/kernel/common/linux/sysctl.h | 2 +- libc/kernel/tools/defaults.py | 1 + 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/libc/kernel/arch-arm/asm/ucontext.h b/libc/kernel/arch-arm/asm/ucontext.h index 769f6945f..f54a7f117 100644 --- a/libc/kernel/arch-arm/asm/ucontext.h +++ b/libc/kernel/arch-arm/asm/ucontext.h @@ -27,7 +27,7 @@ struct ucontext { struct sigcontext uc_mcontext; /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ sigset_t uc_sigmask; - int __unused[32 - (sizeof (sigset_t) / sizeof (int))]; + int __linux_unused[32 - (sizeof (sigset_t) / sizeof (int))]; unsigned long uc_regspace[128] __attribute__((__aligned__(8))); }; /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ diff --git a/libc/kernel/common/linux/sysctl.h b/libc/kernel/common/linux/sysctl.h index 46e5e6779..5769259a0 100644 --- a/libc/kernel/common/linux/sysctl.h +++ b/libc/kernel/common/linux/sysctl.h @@ -34,7 +34,7 @@ struct __sysctl_args { size_t __user *oldlenp; void __user *newval; size_t newlen; - unsigned long __unused[4]; + unsigned long __linux_unused[4]; /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ }; enum diff --git a/libc/kernel/tools/defaults.py b/libc/kernel/tools/defaults.py index 7eeffb4a5..6c7efd689 100644 --- a/libc/kernel/tools/defaults.py +++ b/libc/kernel/tools/defaults.py @@ -51,6 +51,7 @@ kernel_default_arch_macros = { # Replace tokens in the output according to this mapping kernel_token_replacements = { "asm": "__asm__", + "__unused": "__linux_unused", # The kernel usage of __unused conflicts with the macro defined in sys/cdefs.h } # this is the set of known static inline functions that we want to keep