Fix compilation of mips_postboot_fixup() with a C11 compiler

The _Alignas specifier must come before the declaration and not after. It
works if _Alignas() expands to __attribute__(aligned(x)) which was the only
case I tested before.

Approved By:	jhb (mentor)
This commit is contained in:
Alex Richardson 2018-02-07 16:58:01 +00:00
parent 1d3a1bcfac
commit f7925608a5
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=328978

View File

@ -387,7 +387,7 @@ mips_postboot_fixup(void)
* We store u_long sized objects into the reload area, so the array
* must be so aligned. The standard allows any alignment for char data.
*/
static char fake_preload[256] _Alignas(_Alignof(u_long));
_Alignas(_Alignof(u_long)) static char fake_preload[256];
caddr_t preload_ptr = (caddr_t)&fake_preload[0];
size_t size = 0;