summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Dawes <dawes@xfree86.org>2003-05-20 22:42:24 +0000
committerDavid Dawes <dawes@xfree86.org>2003-05-20 22:42:24 +0000
commit2134577e314d1dac4b48b78e5b6d6e92f2c76ea8 (patch)
tree2a3fca6452b6fe0752e0059f044c631267e7ba16
parentb942999b5915cbad75f16f6c242bab03c33f0c8b (diff)
Support for building DRM module on OpenBSD (Wilbern Cobb, Matthieu Herrb).
(resync with XFree86 trunk)
-rw-r--r--bsd/drm.h2
-rw-r--r--linux/drm.h6
-rw-r--r--shared-core/drm.h6
-rw-r--r--shared/drm.h6
4 files changed, 16 insertions, 4 deletions
diff --git a/bsd/drm.h b/bsd/drm.h
index abe2ac3f..df2fa246 100644
--- a/bsd/drm.h
+++ b/bsd/drm.h
@@ -45,7 +45,7 @@
#define DRM_IOC_WRITE _IOC_WRITE
#define DRM_IOC_READWRITE _IOC_READ|_IOC_WRITE
#define DRM_IOC(dir, group, nr, size) _IOC(dir, group, nr, size)
-#elif defined(__FreeBSD__) || defined(__NetBSD__)
+#elif defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__)
#if defined(__FreeBSD__) && defined(XFree86Server)
/* Prevent name collision when including sys/ioccom.h */
#undef ioctl
diff --git a/linux/drm.h b/linux/drm.h
index d1d66943..f987c422 100644
--- a/linux/drm.h
+++ b/linux/drm.h
@@ -44,7 +44,7 @@
#define DRM_IOC_WRITE _IOC_WRITE
#define DRM_IOC_READWRITE _IOC_READ|_IOC_WRITE
#define DRM_IOC(dir, group, nr, size) _IOC(dir, group, nr, size)
-#elif defined(__FreeBSD__) || defined(__NetBSD__)
+#elif defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__)
#if defined(__FreeBSD__) && defined(XFree86Server)
/* Prevent name collision when including sys/ioccom.h */
#undef ioctl
@@ -79,7 +79,11 @@
#endif
#if CONFIG_XFREE86_VERSION >= XFREE86_VERSION(4,1,0,0)
+#ifdef __OpenBSD__
+#define DRM_MAJOR 81
+#else
#define DRM_MAJOR 226
+#endif
#define DRM_MAX_MINOR 15
#endif
#define DRM_NAME "drm" /* Name in kernel, /dev, and /proc */
diff --git a/shared-core/drm.h b/shared-core/drm.h
index d1d66943..f987c422 100644
--- a/shared-core/drm.h
+++ b/shared-core/drm.h
@@ -44,7 +44,7 @@
#define DRM_IOC_WRITE _IOC_WRITE
#define DRM_IOC_READWRITE _IOC_READ|_IOC_WRITE
#define DRM_IOC(dir, group, nr, size) _IOC(dir, group, nr, size)
-#elif defined(__FreeBSD__) || defined(__NetBSD__)
+#elif defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__)
#if defined(__FreeBSD__) && defined(XFree86Server)
/* Prevent name collision when including sys/ioccom.h */
#undef ioctl
@@ -79,7 +79,11 @@
#endif
#if CONFIG_XFREE86_VERSION >= XFREE86_VERSION(4,1,0,0)
+#ifdef __OpenBSD__
+#define DRM_MAJOR 81
+#else
#define DRM_MAJOR 226
+#endif
#define DRM_MAX_MINOR 15
#endif
#define DRM_NAME "drm" /* Name in kernel, /dev, and /proc */
diff --git a/shared/drm.h b/shared/drm.h
index d1d66943..f987c422 100644
--- a/shared/drm.h
+++ b/shared/drm.h
@@ -44,7 +44,7 @@
#define DRM_IOC_WRITE _IOC_WRITE
#define DRM_IOC_READWRITE _IOC_READ|_IOC_WRITE
#define DRM_IOC(dir, group, nr, size) _IOC(dir, group, nr, size)
-#elif defined(__FreeBSD__) || defined(__NetBSD__)
+#elif defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__)
#if defined(__FreeBSD__) && defined(XFree86Server)
/* Prevent name collision when including sys/ioccom.h */
#undef ioctl
@@ -79,7 +79,11 @@
#endif
#if CONFIG_XFREE86_VERSION >= XFREE86_VERSION(4,1,0,0)
+#ifdef __OpenBSD__
+#define DRM_MAJOR 81
+#else
#define DRM_MAJOR 226
+#endif
#define DRM_MAX_MINOR 15
#endif
#define DRM_NAME "drm" /* Name in kernel, /dev, and /proc */