Accepting request 124215 from Virtualization:VMware

Fix build with kernel 3.4

OBS-URL: https://build.opensuse.org/request/show/124215
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/open-vm-tools?expand=0&rev=40
This commit is contained in:
Stephan Kulow 2012-06-10 21:01:30 +00:00 committed by Git OBS Bridge
commit 15657a1236
3 changed files with 52 additions and 0 deletions

45
kernel-3_4.patch Normal file
View File

@ -0,0 +1,45 @@
--- modules/linux/vmhgfs/filesystem.c.old 2012-06-08 11:46:42.000000000 +0000
+++ modules/linux/vmhgfs/filesystem.c 2012-06-08 11:47:57.000000000 +0000
@@ -31,6 +31,7 @@
#include <linux/list.h>
#include <linux/module.h>
#include <linux/pagemap.h>
+#include <linux/version.h>
#include "compat_cred.h"
#include "compat_dcache.h"
#include "compat_fs.h"
@@ -375,8 +376,11 @@
__func__));
goto exit;
}
-
+#if LINUX_VERSION_CODE < KERNEL_VERSION(3,4,0)
tempRootDentry = d_alloc_root(rootInode);
+#else
+ tempRootDentry = d_make_root(rootInode);
+#endif
if (tempRootDentry == NULL) {
LOG(4, (KERN_WARNING "VMware hgfs: %s: Could not get "
"root dentry\n", __func__));
--- modules/linux/vmblock/linux/filesystem.c.old 2012-06-08 11:48:17.000000000 +0000
+++ modules/linux/vmblock/linux/filesystem.c 2012-06-08 11:49:05.000000000 +0000
@@ -29,6 +29,7 @@
#include <linux/proc_fs.h>
#include <linux/mount.h>
#include <linux/fs.h>
+#include <linux/version.h>
#include "compat_namei.h"
@@ -525,7 +526,11 @@
return -EINVAL;
}
+#if LINUX_VERSION_CODE < KERNEL_VERSION(3,4,0)
rootDentry = d_alloc_root(rootInode);
+#else
+ rootDentry = d_make_root(rootInode);
+#endif
if (!rootDentry) {
iput(rootInode);
return -ENOMEM;

View File

@ -1,3 +1,8 @@
-------------------------------------------------------------------
Fri Jun 8 12:04:35 UTC 2012 - jreidinger@suse.com
- Add kernel-3_4.patch: Fix build for kernel-3.4.
-------------------------------------------------------------------
Fri Apr 6 21:18:39 UTC 2012 - dimstar@opensuse.org

View File

@ -47,6 +47,7 @@ Source5: vmware-user-autostart-wrapper
Source6: open-vm-tools-modprobe.conf
Source7: tools.conf
Source98: preamble
Patch1: kernel-3_4.patch
BuildRequires: gcc-c++
# don't use pkgconfig(gtk+-2.0) so we can build on SLE
BuildRequires: gtk2-devel
@ -158,6 +159,7 @@ if you intend to create own plugins for vmtoolsd.
%prep
%setup -q -n %{name}-%{version}-%{svn_rev}
%patch1
chmod -x AUTHORS COPYING ChangeLog NEWS README
# fix for an rpmlint warning regarding wrong line feeds
sed -i -e "s/\r//" README