[PATCH xserver] ad hoc fix for mmap's truncated offset parameter on 32bit

Julien Cristau jcristau at debian.org
Fri Apr 29 07:34:08 UTC 2016


On Thu, Apr 28, 2016 at 16:10:01 +0200, Mark Kettenis wrote:

> > From: Stefan Dirsch <sndirsch at suse.de>
> > Date: Thu, 28 Apr 2016 14:35:00 +0200
> > 
> > Builtin modesetting driver didn't work on 32bit on cirrus KMS. See
> > https://bugzilla.suse.com/show_bug.cgi?id=917385 for more details.
> 
> I think selectively compiling with -D_FILE_OFFSET_BITS=64 is a
> seriously bad idea.  Either evrything should be compiled with that
> switch, or nothing.  And adding a #define like that after including
> some other header files is even worse.
> 
I think the right fix for the referenced bug was
https://cgit.freedesktop.org/xorg/xserver/commit/?id=4962c8c08842d9d3ca66d254b1ce4cacc4fb3756
so this patch should not be necessary anyway.

Cheers,
Julien

> > Signed-off-by: Stefan Dirsch <sndirsch at suse.de>
> > ---
> >  hw/xfree86/drivers/modesetting/dumb_bo.c | 6 ++++++
> >  1 file changed, 6 insertions(+)
> > 
> > diff --git a/hw/xfree86/drivers/modesetting/dumb_bo.c b/hw/xfree86/drivers/modesetting/dumb_bo.c
> > index cf13f0a..42abe8b 100644
> > --- a/hw/xfree86/drivers/modesetting/dumb_bo.c
> > +++ b/hw/xfree86/drivers/modesetting/dumb_bo.c
> > @@ -29,6 +29,12 @@
> >  #include "dix-config.h"
> >  #endif
> >  
> > +/*
> > + * ad hoc fix for mmap's truncated offset parameter on 32bit
> > + * see also https://bugzilla.suse.com/show_bug.cgi?id=917385
> > + */
> > +#define _FILE_OFFSET_BITS 64
> > +
> >  #include "dumb_bo.h"
> >  
> >  #include <errno.h>
> > -- 
> > 2.6.2
> > 
> > _______________________________________________
> > xorg-devel at lists.x.org: X.Org development
> > Archives: http://lists.x.org/archives/xorg-devel
> > Info: https://lists.x.org/mailman/listinfo/xorg-devel
> > 
> > 
> _______________________________________________
> xorg-devel at lists.x.org: X.Org development
> Archives: http://lists.x.org/archives/xorg-devel
> Info: https://lists.x.org/mailman/listinfo/xorg-devel


More information about the xorg-devel mailing list