Dominique Leuenberger 2013-04-24 20:00:15 +00:00 committed by Git OBS Bridge
parent fd59889a24
commit 488e9ea270
3 changed files with 59 additions and 0 deletions

View File

@ -0,0 +1,52 @@
--- a/modules/linux/shared/compat_mm.h
+++ b/modules/linux/shared/compat_mm.h
@@ -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
--- a/modules/linux/vmci/linux/driver.c
+++ b/modules/linux/vmci/linux/driver.c
@@ -124,7 +124,7 @@ static struct pci_driver vmci_driver = {
.name = "vmci",
.id_table = vmci_ids,
.probe = vmci_probe_device,
- .remove = __devexit_p(vmci_remove_device),
+ .remove = vmci_remove_device,
};
#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 19)
@@ -1750,7 +1750,7 @@ vmci_enable_msix(struct pci_dev *pdev) /
*-----------------------------------------------------------------------------
*/
-static int __devinit
+static int
vmci_probe_device(struct pci_dev *pdev, // IN: vmci PCI device
const struct pci_device_id *id) // IN: matching device ID
{
@@ -1978,7 +1978,7 @@ vmci_probe_device(struct pci_dev *pdev,
*-----------------------------------------------------------------------------
*/
-static void __devexit
+static void
vmci_remove_device(struct pci_dev* pdev)
{
struct vmci_device *dev = pci_get_drvdata(pdev);

View File

@ -1,3 +1,8 @@
-------------------------------------------------------------------
Wed Apr 24 19:57:20 UTC 2013 - dimstar@opensuse.org
- Add open-vm-tools-kernel-3.8.patch: Fix build with kernel 3.8.x.
-------------------------------------------------------------------
Wed Apr 3 18:26:54 UTC 2013 - dimstar@opensuse.org

View File

@ -48,6 +48,7 @@ Source6: open-vm-tools-modprobe.conf
Source7: tools.conf
Source98: preamble
Patch0: open-vm-tools-kernel-3.6.patch
Patch1: open-vm-tools-kernel-3.8.patch
BuildRequires: gcc-c++
# don't use pkgconfig(gtk+-2.0) so we can build on SLE
BuildRequires: gtk2-devel
@ -164,6 +165,7 @@ if you intend to create own plugins for vmtoolsd.
%setup -q -n %{name}-%{version}-%{svn_rev}
%if 0%{?suse_version} > 1220
%patch0 -p1
%patch1 -p1
%endif
chmod -x AUTHORS COPYING ChangeLog NEWS README
# fix for an rpmlint warning regarding wrong line feeds