[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#219428: linux-kernel-headers: patch for the bug



On Thu, Nov 06, 2003 at 08:16:21PM +0530, Amit Shah wrote:
> On Thursday 06 Nov 2003 19:42, Daniel Jacobowitz wrote:
> > On Thu, Nov 06, 2003 at 07:26:05PM +0530, Amit Shah wrote:
> > > Package: linux-kernel-headers
> > > Version: 2.5.999-test7-bk-8
> > > Severity: normal
> > > Followup-For: Bug #219428
> > >
> > >
> > > --- byteorder.h.orig    2003-11-06 19:23:14.000000000 +0530
> > > +++ byteorder.h 2003-11-06 19:23:24.000000000 +0530
> > > @@ -39,7 +39,7 @@
> > >
> > >  #if !defined (__STRICT_ANSI__)
> > >
> > >  -static inline __u64 ___arch__swab64(__u64 val)
> > >  +static __inline__ __u64 ___arch__swab64(__u64 val)
> > >   {
> > >   	union {
> > > 	struct { __u32 a,b; } s;
> >
> > Need more information.
> >
> > Kdemultimedia, and the command line you posted, use -ansi.
> > __STRICT_ANSI__ should be defined.
> 
> The concerned piece of code from plat_linux.c:
> 
> /* needed for vanilla kernel headers, which do provide __u64 only
>    for ansi */
> #undef __STRICT_ANSI__
> /* needed for non-ansi kernel headers */
> #define asm __asm__
> #include <asm/types.h>
> #include <linux/cdrom.h>
> #undef asm
> 
> I think a bug has been identified  in the kernel headers; but is this usage 
> correct?

There is no bug in the kernel headers.  Undefining __STRICT_ANSI__ is a
terribly bad thing to do.  Fix this by adding a #define inline __inline__
below the #define asm __asm__, I suppose.

-- 
Daniel Jacobowitz
MontaVista Software                         Debian GNU/Linux Developer



Reply to: