[PATCH] mips: Fix build error by disabling attribute-alias warning

From: He Zhe
Date: Fri Jun 15 2018 - 09:24:49 EST


This patch fixes the following error caused by building arch/mips with
GCC 8.1.0.

In file included from arch/mips/kernel/signal32.c:15:
include/linux/syscalls.h:233:18: error: 'sys_32_sigaction' alias between functions of incompatible types 'long int(long int, const struct compat_sigaction *, struct compat_sigaction *)' and 'long int(long int, long int, long int)' [-Werror=attribute-alias]
asmlinkage long sys##name(__MAP(x,__SC_DECL,__VA_ARGS__)) \
^~~

Signed-off-by: He Zhe <zhe.he@xxxxxxxxxxxxx>
---
arch/mips/kernel/signal32.c | 4 ++++
1 file changed, 4 insertions(+)

diff --git a/arch/mips/kernel/signal32.c b/arch/mips/kernel/signal32.c
index c4db910a8794..95cb406e220d 100644
--- a/arch/mips/kernel/signal32.c
+++ b/arch/mips/kernel/signal32.c
@@ -35,6 +35,9 @@ asmlinkage int sys32_sigsuspend(compat_sigset_t __user *uset)
return compat_sys_rt_sigsuspend(uset, sizeof(compat_sigset_t));
}

+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wpragmas"
+#pragma GCC diagnostic ignored "-Wattribute-alias"
SYSCALL_DEFINE3(32_sigaction, long, sig, const struct compat_sigaction __user *, act,
struct compat_sigaction __user *, oact)
{
@@ -76,3 +79,4 @@ SYSCALL_DEFINE3(32_sigaction, long, sig, const struct compat_sigaction __user *,

return ret;
}
+#pragma GCC diagnostic pop
--
2.11.0