forked from pool/virtualbox
Accepting request 67227 from home:elvigia:branches:Virtualization
OBS-URL: https://build.opensuse.org/request/show/67227 OBS-URL: https://build.opensuse.org/package/show/Virtualization/virtualbox?expand=0&rev=41
This commit is contained in:
parent
a2ec73f0a1
commit
446bb13d5e
168
vbox-kernel-2.6.39.patch
Normal file
168
vbox-kernel-2.6.39.patch
Normal file
@ -0,0 +1,168 @@
|
|||||||
|
Index: src/VBox/Additions/linux/drm/vboxvideo_drm.c
|
||||||
|
===================================================================
|
||||||
|
--- src/VBox/Additions/linux/drm/vboxvideo_drm.c (revisión: 36470)
|
||||||
|
+++ src/VBox/Additions/linux/drm/vboxvideo_drm.c (revisión: 36471)
|
||||||
|
@@ -66,63 +66,83 @@
|
||||||
|
#include "vboxvideo_drm.h"
|
||||||
|
|
||||||
|
static struct pci_device_id pciidlist[] = {
|
||||||
|
- vboxvideo_PCI_IDS
|
||||||
|
+ vboxvideo_PCI_IDS
|
||||||
|
};
|
||||||
|
|
||||||
|
int vboxvideo_driver_load(struct drm_device * dev, unsigned long flags)
|
||||||
|
{
|
||||||
|
# if LINUX_VERSION_CODE >= KERNEL_VERSION (2, 6, 28)
|
||||||
|
- return drm_vblank_init(dev, 1);
|
||||||
|
+ return drm_vblank_init(dev, 1);
|
||||||
|
#else
|
||||||
|
return 0;
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
-static struct drm_driver driver = {
|
||||||
|
- /* .driver_features = DRIVER_USE_MTRR, */
|
||||||
|
- .load = vboxvideo_driver_load,
|
||||||
|
- .reclaim_buffers = drm_core_reclaim_buffers,
|
||||||
|
- /* As of Linux 2.65.37, always the internal functions are used. */
|
||||||
|
+static struct drm_driver driver =
|
||||||
|
+{
|
||||||
|
+ /* .driver_features = DRIVER_USE_MTRR, */
|
||||||
|
+ .load = vboxvideo_driver_load,
|
||||||
|
+ .reclaim_buffers = drm_core_reclaim_buffers,
|
||||||
|
+ /* As of Linux 2.65.37, always the internal functions are used. */
|
||||||
|
#if LINUX_VERSION_CODE < KERNEL_VERSION (2, 6, 37)
|
||||||
|
- .get_map_ofs = drm_core_get_map_ofs,
|
||||||
|
- .get_reg_ofs = drm_core_get_reg_ofs,
|
||||||
|
+ .get_map_ofs = drm_core_get_map_ofs,
|
||||||
|
+ .get_reg_ofs = drm_core_get_reg_ofs,
|
||||||
|
#endif
|
||||||
|
- .fops = {
|
||||||
|
- .owner = THIS_MODULE,
|
||||||
|
- .open = drm_open,
|
||||||
|
- .release = drm_release,
|
||||||
|
- /* This was changed with Linux 2.6.33 but Fedora backported this
|
||||||
|
- * change to their 2.6.32 kernel. */
|
||||||
|
+ .fops =
|
||||||
|
+ {
|
||||||
|
+ .owner = THIS_MODULE,
|
||||||
|
+ .open = drm_open,
|
||||||
|
+ .release = drm_release,
|
||||||
|
+ /* This was changed with Linux 2.6.33 but Fedora backported this
|
||||||
|
+ * change to their 2.6.32 kernel. */
|
||||||
|
#if defined(DRM_UNLOCKED) || LINUX_VERSION_CODE >= KERNEL_VERSION (2, 6, 33)
|
||||||
|
- .unlocked_ioctl = drm_ioctl,
|
||||||
|
+ .unlocked_ioctl = drm_ioctl,
|
||||||
|
#else
|
||||||
|
- .ioctl = drm_ioctl,
|
||||||
|
+ .ioctl = drm_ioctl,
|
||||||
|
#endif
|
||||||
|
- .mmap = drm_mmap,
|
||||||
|
- .poll = drm_poll,
|
||||||
|
- .fasync = drm_fasync,
|
||||||
|
- },
|
||||||
|
- .pci_driver = {
|
||||||
|
- .name = DRIVER_NAME,
|
||||||
|
- .id_table = pciidlist,
|
||||||
|
- },
|
||||||
|
+ .mmap = drm_mmap,
|
||||||
|
+ .poll = drm_poll,
|
||||||
|
+ .fasync = drm_fasync,
|
||||||
|
+ },
|
||||||
|
+#if LINUX_VERSION_CODE < KERNEL_VERSION (2, 6, 39)
|
||||||
|
+ .pci_driver =
|
||||||
|
+ {
|
||||||
|
+ .name = DRIVER_NAME,
|
||||||
|
+ .id_table = pciidlist,
|
||||||
|
+ },
|
||||||
|
+#endif
|
||||||
|
+ .name = DRIVER_NAME,
|
||||||
|
+ .desc = DRIVER_DESC,
|
||||||
|
+ .date = DRIVER_DATE,
|
||||||
|
+ .major = DRIVER_MAJOR,
|
||||||
|
+ .minor = DRIVER_MINOR,
|
||||||
|
+ .patchlevel = DRIVER_PATCHLEVEL,
|
||||||
|
+};
|
||||||
|
|
||||||
|
- .name = DRIVER_NAME,
|
||||||
|
- .desc = DRIVER_DESC,
|
||||||
|
- .date = DRIVER_DATE,
|
||||||
|
- .major = DRIVER_MAJOR,
|
||||||
|
- .minor = DRIVER_MINOR,
|
||||||
|
- .patchlevel = DRIVER_PATCHLEVEL,
|
||||||
|
+#if LINUX_VERSION_CODE >= KERNEL_VERSION (2, 6, 39)
|
||||||
|
+static struct pci_driver pci_driver =
|
||||||
|
+{
|
||||||
|
+ .name = DRIVER_NAME,
|
||||||
|
+ .id_table = pciidlist,
|
||||||
|
};
|
||||||
|
+#endif
|
||||||
|
|
||||||
|
static int __init vboxvideo_init(void)
|
||||||
|
{
|
||||||
|
- return drm_init(&driver);
|
||||||
|
+#if LINUX_VERSION_CODE < KERNEL_VERSION (2, 6, 39)
|
||||||
|
+ return drm_init(&driver);
|
||||||
|
+#else
|
||||||
|
+ return drm_pci_init(&driver, &pci_driver);
|
||||||
|
+#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
static void __exit vboxvideo_exit(void)
|
||||||
|
{
|
||||||
|
- drm_exit(&driver);
|
||||||
|
+#if LINUX_VERSION_CODE < KERNEL_VERSION (2, 6, 39)
|
||||||
|
+ drm_exit(&driver);
|
||||||
|
+#else
|
||||||
|
+ drm_pci_exit(&driver, &pci_driver);
|
||||||
|
+#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
module_init(vboxvideo_init);
|
||||||
|
Index: src/VBox/Additions/linux/sharedfolders/vfsmod.c
|
||||||
|
===================================================================
|
||||||
|
--- src/VBox/Additions/linux/sharedfolders/vfsmod.c (revisión: 36470)
|
||||||
|
+++ src/VBox/Additions/linux/sharedfolders/vfsmod.c (revisión: 36471)
|
||||||
|
@@ -446,27 +446,38 @@
|
||||||
|
return err;
|
||||||
|
}
|
||||||
|
|
||||||
|
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 18)
|
||||||
|
+# if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 18)
|
||||||
|
static struct super_block *sf_get_sb(struct file_system_type *fs_type, int flags,
|
||||||
|
- const char *dev_name, void *data)
|
||||||
|
+ const char *dev_name, void *data)
|
||||||
|
{
|
||||||
|
TRACE();
|
||||||
|
return get_sb_nodev(fs_type, flags, data, sf_read_super_26);
|
||||||
|
}
|
||||||
|
-#else
|
||||||
|
+# elif LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 39)
|
||||||
|
static int sf_get_sb(struct file_system_type *fs_type, int flags,
|
||||||
|
const char *dev_name, void *data, struct vfsmount *mnt)
|
||||||
|
{
|
||||||
|
TRACE();
|
||||||
|
return get_sb_nodev(fs_type, flags, data, sf_read_super_26, mnt);
|
||||||
|
}
|
||||||
|
-#endif
|
||||||
|
+# else
|
||||||
|
+static struct dentry *sf_mount(struct file_system_type *fs_type, int flags,
|
||||||
|
+ const char *dev_name, void *data)
|
||||||
|
+{
|
||||||
|
+ TRACE();
|
||||||
|
+ return mount_nodev(fs_type, flags, data, sf_read_super_26);
|
||||||
|
+}
|
||||||
|
+# endif
|
||||||
|
|
||||||
|
static struct file_system_type vboxsf_fs_type =
|
||||||
|
{
|
||||||
|
.owner = THIS_MODULE,
|
||||||
|
.name = "vboxsf",
|
||||||
|
+# if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 39)
|
||||||
|
.get_sb = sf_get_sb,
|
||||||
|
+# else
|
||||||
|
+ .mount = sf_mount,
|
||||||
|
+# endif
|
||||||
|
.kill_sb = kill_anon_super
|
||||||
|
};
|
||||||
|
#endif
|
@ -1,3 +1,8 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Wed Apr 13 19:04:19 UTC 2011 - crrodriguez@opensuse.org
|
||||||
|
|
||||||
|
- Fix build in kernel 2.6.39
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Wed Apr 13 15:58:01 UTC 2011 - crrodriguez@opensuse.org
|
Wed Apr 13 15:58:01 UTC 2011 - crrodriguez@opensuse.org
|
||||||
|
|
||||||
|
@ -93,6 +93,7 @@ Patch101: vbox-default-os-type.diff
|
|||||||
#disable update in vbox gui
|
#disable update in vbox gui
|
||||||
Patch102: vbox-disable-updates.diff
|
Patch102: vbox-disable-updates.diff
|
||||||
Patch103: virtualbox-ose_4.0.4-dfsg-1.diff.gz
|
Patch103: virtualbox-ose_4.0.4-dfsg-1.diff.gz
|
||||||
|
Patch104: vbox-kernel-2.6.39.patch
|
||||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||||
PreReq: pwdutils permissions
|
PreReq: pwdutils permissions
|
||||||
Requires: %{name}-host-kmp = %version
|
Requires: %{name}-host-kmp = %version
|
||||||
@ -217,7 +218,7 @@ quilt push -a
|
|||||||
%patch100
|
%patch100
|
||||||
%patch101
|
%patch101
|
||||||
%patch102 -p1
|
%patch102 -p1
|
||||||
|
%patch104
|
||||||
#copy user manual
|
#copy user manual
|
||||||
%__cp %{S:1} ./UserManual.pdf
|
%__cp %{S:1} ./UserManual.pdf
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user