提交 1d3e2d79 编写于 作者: M Maciej W. Rozycki 提交者: Ralf Baechle

MIPS: uapi/asm/siginfo.h: Fix GCC 4.1.2 compilation

It wasn't until GCC 4.3 I believe that the __SIZEOF_*__ predefined macros
were added.  The change below switches <uapi/asm/siginfo.h> to the
_MIPS_SZLONG macro so that compilation with e.g. GCC 4.1.2 succeeds.
This is a user API header so I think this is even more important, for
older userland support.  The change adds an unsuccessful default too, to
catch any compiler configuration oddities.
Signed-off-by: NMaciej W. Rozycki <macro@linux-mips.org>
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/5630/Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
上级 7ad18dd0
...@@ -25,11 +25,12 @@ struct siginfo; ...@@ -25,11 +25,12 @@ struct siginfo;
/* /*
* Careful to keep union _sifields from shifting ... * Careful to keep union _sifields from shifting ...
*/ */
#if __SIZEOF_LONG__ == 4 #if _MIPS_SZLONG == 32
#define __ARCH_SI_PREAMBLE_SIZE (3 * sizeof(int)) #define __ARCH_SI_PREAMBLE_SIZE (3 * sizeof(int))
#endif #elif _MIPS_SZLONG == 64
#if __SIZEOF_LONG__ == 8
#define __ARCH_SI_PREAMBLE_SIZE (4 * sizeof(int)) #define __ARCH_SI_PREAMBLE_SIZE (4 * sizeof(int))
#else
#error _MIPS_SZLONG neither 32 nor 64
#endif #endif
#include <asm-generic/siginfo.h> #include <asm-generic/siginfo.h>
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册