From 4835beacc0ec172f3a0622a490c65bd0a79cee9f Mon Sep 17 00:00:00 2001 From: Stefan Saraev Date: Sun, 31 Mar 2013 19:04:44 +0300 Subject: [PATCH] open-vm-tools: add linux-3.8 support patch --- ...open-vm-tools-9.2.2-893683-linux-3.8.patch | 60 +++++++++++++++++++ 1 file changed, 60 insertions(+) create mode 100644 packages/sysutils/open-vm-tools/patches/open-vm-tools-9.2.2-893683-linux-3.8.patch diff --git a/packages/sysutils/open-vm-tools/patches/open-vm-tools-9.2.2-893683-linux-3.8.patch b/packages/sysutils/open-vm-tools/patches/open-vm-tools-9.2.2-893683-linux-3.8.patch new file mode 100644 index 0000000000..bc087218d8 --- /dev/null +++ b/packages/sysutils/open-vm-tools/patches/open-vm-tools-9.2.2-893683-linux-3.8.patch @@ -0,0 +1,60 @@ +--- open-vm-tools-2012.05.21-724730/modules/linux/vmci/linux/driver.c~ 2012-05-22 22:12:52.000000000 +0200 ++++ open-vm-tools-2012.05.21-724730/modules/linux/vmci/linux/driver.c 2013-02-21 01:22:04.836684885 +0100 +@@ -128,7 +128,11 @@ static struct pci_driver vmci_driver = { + .name = VMCI_DEVICE_NAME, + .id_table = vmci_ids, + .probe = vmci_probe_device, ++#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 8, 0) + .remove = __devexit_p(vmci_remove_device), ++#else ++ .remove = vmci_remove_device, ++#endif + }; + + #if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 19) +@@ -1747,7 +1751,10 @@ vmci_enable_msix(struct pci_dev *pdev) / + *----------------------------------------------------------------------------- + */ + +-static int __devinit ++static int ++#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 8, 0) ++__devinit ++#endif + vmci_probe_device(struct pci_dev *pdev, // IN: vmci PCI device + const struct pci_device_id *id) // IN: matching device ID + { +@@ -1975,7 +1982,10 @@ vmci_probe_device(struct pci_dev *pdev, + *----------------------------------------------------------------------------- + */ + +-static void __devexit ++static void ++#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 8, 0) ++__devexit ++#endif + vmci_remove_device(struct pci_dev* pdev) + { + struct vmci_device *dev = pci_get_drvdata(pdev); +--- open-vm-tools-2012.05.21-724730/modules/linux/shared/compat_mm.h 2013-01-17 17:58:53.090333002 +0100 ++++ open-vm-tools-2012.05.21-724730/modules/linux/shared/compat_mm.h 2013-01-17 18:18:25.274280444 +0100 +@@ -99,8 +99,18 @@ static inline struct page * alloc_pages( + vmtruncate(inode, size); \ + result; \ + }) +-#else ++#elif LINUX_VERSION_CODE < KERNEL_VERSION(3, 8, 0) + #define compat_vmtruncate(inode, size) vmtruncate(inode, size) ++#else ++#define compat_vmtruncate(inode, size) \ ++({ \ ++ result = inode_newsize_ok(inode, size); \ ++ if (!result) \ ++ { \ ++ truncate_setsize(inode, size); \ ++ } \ ++ result; \ ++}) + #endif + +