1
Description: Fix build failure with the Debian wheezy kernel which backports the drm subsystem from Linux 3.4.
2
Bug-Debian: http://bugs.debian.org/703358
3
Author: Felix Geyer <fgeyer@debian.org>
5
diff --git a/src/VBox/Additions/linux/drm/vboxvideo_drm.c b/src/VBox/Additions/linux/drm/vboxvideo_drm.c
6
--- a/src/VBox/Additions/linux/drm/vboxvideo_drm.c
7
+++ b/src/VBox/Additions/linux/drm/vboxvideo_drm.c
10
#include "vboxvideo_drm.h"
12
+# if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 2, 0)
13
+# ifdef DRM_IOCTL_MODE_GETPLANE
14
+# define DRM_DEBIAN70
18
static struct pci_device_id pciidlist[] = {
21
@@ -88,7 +94,7 @@ int vboxvideo_driver_load(struct drm_device * dev, unsigned long flags)
25
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 3, 0) || defined(DRM_RHEL63)
26
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 3, 0) || defined(DRM_RHEL63) || defined(DRM_DEBIAN70)
27
/* since linux-3.3.0-rc1 drm_driver::fops is pointer */
28
static struct file_operations driver_fops =
30
@@ -114,7 +120,7 @@ static struct drm_driver driver =
31
.get_map_ofs = drm_core_get_map_ofs,
32
.get_reg_ofs = drm_core_get_reg_ofs,
34
-# if LINUX_VERSION_CODE < KERNEL_VERSION(3, 3, 0) && !defined(DRM_RHEL63)
35
+# if LINUX_VERSION_CODE < KERNEL_VERSION(3, 3, 0) && !defined(DRM_RHEL63) && !defined(DRM_DEBIAN70)
39
@@ -131,7 +137,7 @@ static struct drm_driver driver =
43
-#else /* LINUX_VERSION_CODE >= KERNEL_VERSION(3, 3, 0) || defined(DRM_RHEL63) */
44
+#else /* LINUX_VERSION_CODE >= KERNEL_VERSION(3, 3, 0) || defined(DRM_RHEL63) || defined(DRM_DEBIAN70) */
47
#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 39) && !defined(DRM_RHEL61)