[PATCH v2] xf86: Fix build against recent Linux kernel

Thierry Reding thierry.reding at avionic-design.de
Wed Oct 17 22:48:26 PDT 2012


On Thu, Oct 18, 2012 at 09:17:58AM +1000, Peter Hutterer wrote:
> On Wed, Oct 17, 2012 at 12:11:49PM +0200, Thierry Reding wrote:
> > Recent Linux kernels reworked the linux/input.h header file, which is
> > now part of the "user-space API". The include guard therefore has an
> > additional additional _UAPI prefix.
> > 
> > Instead of adding another case to the #ifdef, drop any include guard
> > checks and instead always undefine the BUS_* definitions on Linux.
> > 
> > Signed-off-by: Thierry Reding <thierry.reding at avionic-design.de>
> > ---
> > Changes in v2:
> > - drop include guard checks as suggested by Julien Cristau
> > 
> >  hw/xfree86/common/xf86str.h | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/hw/xfree86/common/xf86str.h b/hw/xfree86/common/xf86str.h
> > index 0590262..4c2d147 100644
> > --- a/hw/xfree86/common/xf86str.h
> > +++ b/hw/xfree86/common/xf86str.h
> > @@ -347,7 +347,7 @@ typedef struct _DriverRec {
> >   */
> >  
> >  /* Tolerate prior #include <linux/input.h> */
> > -#if defined(linux) && defined(_INPUT_H)
> > +#if defined(linux)
> >  #undef BUS_NONE
> >  #undef BUS_PCI
> >  #undef BUS_SBUS
> > -- 
> > 1.7.12.3
> 
> makes me wonder why we need the defined(linux) in place then, but merged
> anyway. Thanks.

I left it in place because it matches with the intent of the comment
above. But on any other OS that somewhere defines these constants the
build will also fail as it is.

Thierry
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: not available
URL: <http://lists.x.org/archives/xorg-devel/attachments/20121018/23c162ae/attachment.pgp>


More information about the xorg-devel mailing list