[MPlayer-dev-eng] [PATCH 1/11] MPlayer <-> GeeXboX patches port : PPC includes

Aurelien Jacobs aurel at gnuage.org
Fri Feb 24 22:57:47 CET 2006


On Fri, 24 Feb 2006 20:17:46 +0100
Diego Biurrun <diego at biurrun.de> wrote:

> On Fri, Feb 24, 2006 at 04:07:50PM +0100, Benjamin Zores wrote:
> > 
> > This one fixes the #include <linux/pci.h> for ppc target (linux 2.6).
> 
> Please elaborate why this is necessary..
> 
> 
> > --- MPlayer-20051213.orig/libdha/sysdep/pci_linux.c	2006-02-23 10:49:35.000000000 +0100
> > +++ MPlayer-20051213/libdha/sysdep/pci_linux.c	2006-02-23 10:50:33.000000000 +0100
> > @@ -131,6 +131,7 @@
> >     mplayer-dev-eng at mplayerhq.hu, colin at colino.net*/
> >  #include <fcntl.h>
> >  //#include <sys/io.h>
> > +#define LINUX_MOD_DEVICETABLE_H
> >  #include <linux/pci.h>
> 
> At the top of my /usr/include/linux/pci.h is:
> 
> #ifdef __KERNEL__
> #include <linux/mod_devicetable.h>
> #endif
> 
> and at the top of that file is
> 
> #ifndef LINUX_MOD_DEVICETABLE_H
> #define LINUX_MOD_DEVICETABLE_H
> 
> So why do we need to define it separately?

Here on a 2.6.15 kernel, there is no #ifdef __KERNEL__ so defining
LINUX_MOD_DEVICETABLE_H prevent the inclusion of mod_devicetable.h.

Arguably, this is a kernel header bug, but anyway, those buggy
headers are in a wildspread use. So I think this trivial workaround
won't hurt.

Aurel




More information about the MPlayer-dev-eng mailing list