Re: [PATCH] IO{R,W,RW}_BAD

From: Andreas Schwab <schwab_at_suse.de>
Date: 2003-10-10 18:36:59
Matthew Wilcox <willy@debian.org> writes:

> We need this patch to compile some drivers.  It's a mirror of the patch
> applied to i386 and other architectures.
>
> Index: include/asm-ia64/ioctl.h
> ===================================================================
> RCS file: /var/cvs/linux-2.6/include/asm-ia64/ioctl.h,v
> retrieving revision 1.1
> diff -u -p -r1.1 ioctl.h
> --- include/asm-ia64/ioctl.h	29 Jul 2003 17:01:57 -0000	1.1
> +++ include/asm-ia64/ioctl.h	30 Sep 2003 22:23:28 -0000
> @@ -54,11 +54,21 @@
>  	 ((nr)   << _IOC_NRSHIFT) | \
>  	 ((size) << _IOC_SIZESHIFT))
>  
> +/* provoke compile error for invalid uses of size argument */
> +extern int __invalid_size_argument_for_IOC;
> +#define _IOC_TYPECHECK(t) \
> +	((sizeof(t) == sizeof(t[1]) && \
> +	  sizeof(t) < (1 << _IOC_SIZEBITS)) ? \
> +	  sizeof(t) : __invalid_size_argument_for_IOC)

This needs to be implemented differently.  Glibc needs to include this
file for <sys/ioctl.h>, but the use of the undefined symbol will make it
impossible to compile without optimisation.

Andreas.

-- 
Andreas Schwab, SuSE Labs, schwab@suse.de
SuSE Linux AG, Deutschherrnstr. 15-19, D-90429 Nürnberg
Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."
-
To unsubscribe from this list: send the line "unsubscribe linux-ia64" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Received on Fri Oct 10 04:41:18 2003

This archive was generated by hypermail 2.1.8 : 2005-08-02 09:20:19 EST