--- vbox.0.orig/vboxvideo_drm.c	2013-07-04 16:18:03.000000000 +0200
+++ vbox.0/vboxvideo_drm.c	2013-07-23 18:20:13.000000000 +0200
@@ -60,6 +60,28 @@
 #include <linux/module.h>
 #include "version-generated.h"
 
+/* Taken from the igb driver's kcompat.h (http://sf.net/projects/e1000) */
+/* SuSE version macro is the same as Linux kernel version */
+#ifndef SLE_VERSION
+#define SLE_VERSION(a,b,c) KERNEL_VERSION(a,b,c)
+#endif
+#ifdef CONFIG_SUSE_KERNEL
+#if ( LINUX_VERSION_CODE == KERNEL_VERSION(2,6,27) )
+/* SLES11 GA is 2.6.27 based */
+#define SLE_VERSION_CODE SLE_VERSION(11,0,0)
+#elif ( LINUX_VERSION_CODE == KERNEL_VERSION(2,6,32) )
+/* SLES11 SP1 is 2.6.32 based */
+#define SLE_VERSION_CODE SLE_VERSION(11,1,0)
+#elif ((LINUX_VERSION_CODE >= KERNEL_VERSION(3,0,61)) && \
+(LINUX_VERSION_CODE < KERNEL_VERSION(3,1,0)))
+/* SLES11 SP3 is at least 3.0.61+ based */
+#define SLE_VERSION_CODE SLE_VERSION(11,3,0)
+#endif /* LINUX_VERSION_CODE == KERNEL_VERSION(x,y,z) */
+#endif /* CONFIG_SUSE_KERNEL */
+#ifndef SLE_VERSION_CODE
+#define SLE_VERSION_CODE 0
+#endif /* SLE_VERSION_CODE */
+
 #if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 27)
 
 # if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 32)
@@ -79,6 +101,10 @@
 #include "drm/drmP.h"
 #include "vboxvideo_drm.h"
 
+# if SLE_VERSION_CODE >= SLE_VERSION(11,3,0)
+#  define DRM_SLES11SP3
+# endif
+
 # ifndef RHEL_RELEASE_CODE
 #  if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 2, 39) && LINUX_VERSION_CODE < KERNEL_VERSION(3, 3, 0)
 #   if defined(DRM_MODE_OBJECT_PLANE) && defined(DRM_IOCTL_MODE_ADDFB2)
@@ -99,7 +125,7 @@
     return 0;
 #endif
 }
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 3, 0) || defined(DRM_RHEL63) || defined(DRM_DEBIAN_34ON32)
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 3, 0) || defined(DRM_RHEL63) || defined(DRM_SLES11SP3) || defined(DRM_DEBIAN_34ON32)
 /* since linux-3.3.0-rc1 drm_driver::fops is pointer */
 static struct file_operations driver_fops =
 {
@@ -117,7 +143,7 @@
 {
     /* .driver_features = DRIVER_USE_MTRR, */
     .load = vboxvideo_driver_load,
-#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 6, 0) && !defined(DRM_RHEL64)
+#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 6, 0) && !defined(DRM_SLES11SP3) && !defined(DRM_RHEL64)
     .reclaim_buffers = drm_core_reclaim_buffers,
 #endif
     /* As of Linux 2.6.37, always the internal functions are used. */
@@ -125,7 +151,7 @@
     .get_map_ofs = drm_core_get_map_ofs,
     .get_reg_ofs = drm_core_get_reg_ofs,
 #endif
-# if LINUX_VERSION_CODE < KERNEL_VERSION(3, 3, 0) && !defined(DRM_RHEL63) && !defined(DRM_DEBIAN_34ON32)
+# if LINUX_VERSION_CODE < KERNEL_VERSION(3, 3, 0) && !defined(DRM_RHEL63) && !defined(DRM_SLES11SP3) && !defined(DRM_DEBIAN_34ON32)
     .fops =
     {
         .owner = THIS_MODULE,
