[PATCH libdrm] xf86drm: correct the OpenBSD DRM_MAJOR define

Jonathan Gray jsg at jsg.id.au
Mon Jul 20 09:15:05 PDT 2015


On Mon, Jul 20, 2015 at 05:06:09PM +0100, Emil Velikov wrote:
> On 18 July 2015 at 22:20, Jonathan Gray <jsg at jsg.id.au> wrote:
> > As far as I can tell no OpenBSD platform ever used 81
> > for a drm major.  While the value was added to libdrm in 2003
> > or earlier drm didn't appear in OpenBSD till 2007.
> >
> > Of the OpenBSD platforms that support drm amd64/macppc/sparc64
> > use a major of 87, i386 uses 88.
> >
> > Signed-off-by: Jonathan Gray <jsg at jsg.id.au>
> > ---
> >  xf86drm.c | 8 +++++---
> >  1 file changed, 5 insertions(+), 3 deletions(-)
> >
> > diff --git a/xf86drm.c b/xf86drm.c
> > index 7d7f9c7..a2c549c 100644
> > --- a/xf86drm.c
> > +++ b/xf86drm.c
> > @@ -72,9 +72,11 @@
> >  #define DRM_MAJOR 34
> >  #endif
> >
> > -# ifdef __OpenBSD__
> > -#  define DRM_MAJOR 81
> > -# endif
> > +#if defined(__OpenBSD__) && defined(__i386__)
> > +#define DRM_MAJOR 88
> > +#elif defined(__OpenBSD__)
> > +#define DRM_MAJOR 87
> > +#endif
> >
> Bikeshed: any objections if we cascade the ifdef statements ?

Do you mean indent the defines or have the entire block
undef ifdef __OpenBSD__?  Either way would be fine with me.


More information about the dri-devel mailing list