From f7925608a5b36af5cc9f95c134a3d0172cf957bd Mon Sep 17 00:00:00 2001 From: Alex Richardson Date: Wed, 7 Feb 2018 16:58:01 +0000 Subject: [PATCH] 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) --- sys/mips/mips/machdep.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/mips/mips/machdep.c b/sys/mips/mips/machdep.c index 29c0bbb662f1..efd604a48c4d 100644 --- a/sys/mips/mips/machdep.c +++ b/sys/mips/mips/machdep.c @@ -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;