From: Jonathan Gray Date: Mon, 20 Jul 2015 17:12:10 +0000 (+1000) Subject: xf86drm: correct the OpenBSD DRM_MAJOR define X-Git-Tag: libdrm-2.4.63~106 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=66c3afb75fa993f2f8b00c2dd9c2ec37a3a9dfb6;p=platform%2Fupstream%2Flibdrm.git xf86drm: correct the OpenBSD DRM_MAJOR define 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. v2: rearrange ifdefs as suggested by Emil. Signed-off-by: Jonathan Gray Reviewed-by: Emil Velikov --- diff --git a/xf86drm.c b/xf86drm.c index 39c6e2d..e23a51f 100644 --- a/xf86drm.c +++ b/xf86drm.c @@ -72,9 +72,13 @@ #define DRM_MAJOR 34 #endif -# ifdef __OpenBSD__ -# define DRM_MAJOR 81 -# endif +#ifdef __OpenBSD__ +#ifdef __i386__ +#define DRM_MAJOR 88 +#else +#define DRM_MAJOR 87 +#endif +#endif /* __OpenBSD__ */ #ifndef DRM_MAJOR #define DRM_MAJOR 226 /* Linux */