From 21fa5d311c17c9fcfafa635ef5e75ee4e538c19e Mon Sep 17 00:00:00 2001 From: Kai Germaschewski Date: Mon, 10 Jun 2002 09:52:33 -0500 Subject: kbuild: Fix unaligned access in sanity check fixdep does a sanity check to make sure that it got endianness and sizeof(int) right. As opposed to the main loops, this sanity check forgot to ensure proper alignment. --- scripts/fixdep.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'scripts/fixdep.c') diff --git a/scripts/fixdep.c b/scripts/fixdep.c index 340b64036111..b5d7bee8efc7 100644 --- a/scripts/fixdep.c +++ b/scripts/fixdep.c @@ -348,7 +348,7 @@ void print_deps(void) void traps(void) { - char *test = "CONF"; + static char test[] __attribute__((aligned(sizeof(int)))) = "CONF"; if (*(int *)test != INT_CONF) { fprintf(stderr, "fixdep: sizeof(int) != 4 or wrong endianess? %#x\n", -- cgit v1.2.3