~ubuntu-branches/ubuntu/natty/virtualbox-ose/natty-updates

« back to all changes in this revision

Viewing changes to debian/patches/25-vboxnetadp_kernel_2.6.36.patch

  • Committer: Bazaar Package Importer
  • Author(s): Felix Geyer
  • Date: 2010-10-15 02:12:28 UTC
  • mfrom: (0.3.10 upstream) (0.4.19 sid)
  • Revision ID: james.westby@ubuntu.com-20101015021228-5e6vbxgtes8mg189
Tags: 3.2.10-dfsg-1ubuntu1
* Merge from Debian unstable, remaining changes:
  - VirtualBox should go in Accessories, not in System tools.
    - debian/virtualbox-ose-qt.files/virtualbox-ose.desktop
  - Add Apport hook.
    - debian/virtualbox-ose.files/source_virtualbox-ose.py
    - debian/virtualbox-ose.install
  - Drop *-source packages.
* Add ubuntu-01-fix-build-gcc45.patch to fix FTBFS due to uninitalized
  variables. Thanks to Lubomir Rintel <lkundrak@v3.sk> for the patch.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
Description: Add support for kernel 2.6.36
2
 
Origin: upstream, http://vbox.innotek.de/pipermail/vbox-dev/2010-August/003143.html
3
 
 
4
 
--- virtualbox-ose-3.2.8-dfsg.orig/src/VBox/HostDrivers/VBoxNetAdp/linux/VBoxNetAdp-linux.c     (revision 64881)
5
 
+++ virtualbox-ose-3.2.8-dfsg/src/VBox/HostDrivers/VBoxNetAdp/linux/VBoxNetAdp-linux.c  (revision 64882)
6
 
@@ -60,7 +60,12 @@
7
 
 
8
 
 static int VBoxNetAdpLinuxOpen(struct inode *pInode, struct file *pFilp);
9
 
 static int VBoxNetAdpLinuxClose(struct inode *pInode, struct file *pFilp);
10
 
-static int VBoxNetAdpLinuxIOCtl(struct inode *pInode, struct file *pFilp, unsigned int uCmd, unsigned long ulArg);
11
 
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 36)
12
 
+static int VBoxNetAdpLinuxIOCtl(struct inode *pInode, struct file *pFilp,
13
 
+#else /* LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 36) */
14
 
+static long VBoxNetAdpLinuxIOCtlUnlocked(struct file *pFilp,
15
 
+#endif /* LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 36) */
16
 
+                                unsigned int uCmd, unsigned long ulArg);
17
 
 
18
 
 /*******************************************************************************
19
 
 *   Global Variables                                                           *
20
 
@@ -83,7 +88,11 @@
21
 
     owner:      THIS_MODULE,
22
 
     open:       VBoxNetAdpLinuxOpen,
23
 
     release:    VBoxNetAdpLinuxClose,
24
 
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 36)
25
 
     ioctl:      VBoxNetAdpLinuxIOCtl,
26
 
+#else /* LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 36) */
27
 
+    unlocked_ioctl: VBoxNetAdpLinuxIOCtlUnlocked,
28
 
+#endif /* LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 36) */
29
 
 };
30
 
 
31
 
 /** The miscdevice structure. */
32
 
@@ -246,7 +255,12 @@
33
 
  * @param   uCmd        The function specified to ioctl().
34
 
  * @param   ulArg       The argument specified to ioctl().
35
 
  */
36
 
-static int VBoxNetAdpLinuxIOCtl(struct inode *pInode, struct file *pFilp, unsigned int uCmd, unsigned long ulArg)
37
 
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 36)
38
 
+static int VBoxNetAdpLinuxIOCtl(struct inode *pInode, struct file *pFilp,
39
 
+#else /* LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 36) */
40
 
+static long VBoxNetAdpLinuxIOCtlUnlocked(struct file *pFilp,
41
 
+#endif /* LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 36) */
42
 
+                                unsigned int uCmd, unsigned long ulArg)
43
 
 {
44
 
     VBOXNETADPREQ Req;
45
 
     PVBOXNETADP pAdp;