Module Name:    src
Committed By:   riastradh
Date:           Wed Jul 24 02:16:40 UTC 2013

Modified Files:
        src/sys/external/bsd/drm2/dist/include/drm [riastradh-drm2]: drmP.h

Log Message:
Define DRM_IOCTL_NR and DRM_MAJOR appropriately for NetBSD.


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.1.2.19 -r1.1.1.1.2.20 \
    src/sys/external/bsd/drm2/dist/include/drm/drmP.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/external/bsd/drm2/dist/include/drm/drmP.h
diff -u src/sys/external/bsd/drm2/dist/include/drm/drmP.h:1.1.1.1.2.19 src/sys/external/bsd/drm2/dist/include/drm/drmP.h:1.1.1.1.2.20
--- src/sys/external/bsd/drm2/dist/include/drm/drmP.h:1.1.1.1.2.19	Wed Jul 24 02:13:23 2013
+++ src/sys/external/bsd/drm2/dist/include/drm/drmP.h	Wed Jul 24 02:16:40 2013
@@ -311,8 +311,15 @@ typedef int drm_ioctl_t(struct drm_devic
 typedef int drm_ioctl_compat_t(struct file *filp, unsigned int cmd,
 			       unsigned long arg);
 
+#ifdef __NetBSD__
+/* XXX Kludge...is there a better way to do this?  */
+#define	DRM_IOCTL_NR(n)							\
+	(IOCBASECMD(n) &~ (IOCGROUP(n) << IOCGROUP_SHIFT))
+#define	DRM_MAJOR	cdevsw_lookup_major(&drm_cdevsw)
+#else
 #define DRM_IOCTL_NR(n)                _IOC_NR(n)
 #define DRM_MAJOR       226
+#endif
 
 #define DRM_AUTH	0x1
 #define	DRM_MASTER	0x2

Reply via email to