Re: [PATCH] Fix BUILD_BUG_ON in fs/compat_ioctl.c to build with gcc 4.5 snapshot

From: Arnd Bergmann
Date: Mon Dec 21 2009 - 11:48:36 EST


On Sunday 20 December 2009, Andi Kleen wrote:
> ===================================================================
> --- linux-2.6.33-rc1-ak.orig/fs/compat_ioctl.c
> +++ linux-2.6.33-rc1-ak/fs/compat_ioctl.c
> @@ -1649,8 +1649,10 @@ static int compat_ioctl_check_table(unsi
> {
> int i;
> const int max = ARRAY_SIZE(ioctl_pointer) - 1;
> + extern void __ioctl_pointer_too_large(void);
>
> - BUILD_BUG_ON(max >= (1 << 16));
> + if (max >= (1 << 16))
> + __ioctl_pointer_too_large();
>
> /* guess initial offset into table, assuming a
> normalized distribution */

Acked-by: Arnd Bergmann <arnd@xxxxxxxx>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/