Author: sergiomb
Update of /cvs/free/rpms/VirtualBox-OSE/devel
In directory se02.es.rpmfusion.net:/tmp/cvs-serv26201
Modified Files:
VirtualBox-OSE.spec
Added Files:
VirtualBox-OSE-4.1.6-kernel-3.2_compile_fixes.patch
Log Message:
* Sun Dec 11 2011 Sérgio Basto <sergio(a)serjux.com> - 4.1.6-6
- added compile fixes for kernel 3.2, although guest client still not start with X, now I
got a
segfault, but will help who want try guest client with rawhide.
VirtualBox-OSE-4.1.6-kernel-3.2_compile_fixes.patch:
Additions/linux/sharedfolders/utils.c | 18 ++++++++++++++++--
HostDrivers/VBoxPci/linux/VBoxPci-linux.c | 30 +++++++++++++++++++-----------
2 files changed, 35 insertions(+), 13 deletions(-)
--- NEW FILE VirtualBox-OSE-4.1.6-kernel-3.2_compile_fixes.patch ---
from
https://www.virtualbox.org/changeset/39224
Index: /trunk/src/VBox/HostDrivers/VBoxPci/linux/VBoxPci-linux.c
===================================================================
--- trunk/src/VBox/HostDrivers/VBoxPci/linux/VBoxPci-linux.c (revision 38299)
+++ trunk/src/VBox/HostDrivers/VBoxPci/linux/VBoxPci-linux.c (revision 39224)
@@ -33,14 +33,22 @@
#include "VBoxPciInternal.h"
#ifdef VBOX_WITH_IOMMU
-#include <linux/dmar.h>
-#include <linux/intel-iommu.h>
-#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 1, 0)
-# include <asm/amd_iommu.h>
-#else
-# include <linux/amd-iommu.h>
-#endif
-#endif
+# include <linux/dmar.h>
+# include <linux/intel-iommu.h>
+# include <linux/pci.h>
+# if LINUX_VERSION_CODE < KERNEL_VERSION(3, 1, 0)
+# include <asm/amd_iommu.h>
+# else
+# include <linux/amd-iommu.h>
+# endif
+# if LINUX_VERSION_CODE < KERNEL_VERSION(3, 2, 0)
+# define IOMMU_PRESENT() iommu_found()
+# define IOMMU_DOMAIN_ALLOC() iommu_domain_alloc()
+# else
+# define IOMMU_PRESENT() iommu_present(&pci_bus_type)
+# define IOMMU_DOMAIN_ALLOC() iommu_domain_alloc(&pci_bus_type)
+# endif
+#endif /* VBOX_WITH_IOMMU */
/*******************************************************************************
@@ -146,7 +154,7 @@
#endif
#ifdef VBOX_WITH_IOMMU
- if (iommu_found())
+ if (IOMMU_PRESENT())
printk(KERN_INFO "vboxpci: IOMMU found\n");
else
printk(KERN_INFO "vboxpci: IOMMU not found (not registered)\n");
@@ -984,9 +992,9 @@
printk(KERN_DEBUG "vboxPciOsInitVm: %p\n", pThis);
#endif
#ifdef VBOX_WITH_IOMMU
- if (iommu_found())
+ if (IOMMU_PRESENT())
{
- pThis->pIommuDomain = iommu_domain_alloc();
+ pThis->pIommuDomain = IOMMU_DOMAIN_ALLOC();
if (!pThis->pIommuDomain)
{
printk(KERN_DEBUG "cannot allocate IOMMU domain\n");
Index: /trunk/src/VBox/Additions/linux/sharedfolders/utils.c
===================================================================
--- trunk/src/VBox/Additions/linux/sharedfolders/utils.c (revision 38925)
+++ trunk/src/VBox/Additions/linux/sharedfolders/utils.c (revision 39224)
@@ -110,7 +110,11 @@
inode->i_fop = &sf_dir_fops;
/* XXX: this probably should be set to the number of entries
in the directory plus two (. ..) */
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 2, 0)
+ set_nlink(inode, 1);
+#else
inode->i_nlink = 1;
+#endif
}
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 0)
else if (RTFS_IS_SYMLINK(attr->fMode))
@@ -119,7 +123,11 @@
inode->i_mode &= ~sf_g->fmask;
inode->i_mode |= S_IFLNK;
inode->i_op = &sf_lnk_iops;
+# if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 2, 0)
+ set_nlink(inode, 1);
+# else
inode->i_nlink = 1;
+# endif
}
#endif
else
@@ -129,7 +137,11 @@
inode->i_mode |= S_IFREG;
inode->i_op = &sf_reg_iops;
inode->i_fop = &sf_reg_fops;
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 2, 0)
+ set_nlink(inode, 1);
+#else
inode->i_nlink = 1;
+#endif
}
inode->i_uid = sf_g->uid;
@@ -557,11 +569,13 @@
while (in_bound_len)
{
int nb;
- wchar_t uni; /** @todo this should be unicode_t in more recent kernel
versions. */
-
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 31)
+ unicode_t uni;
+
nb = utf8_to_utf32(in, in_bound_len, &uni);
#else
+ linux_wchar_t uni;
+
nb = utf8_mbtowc(&uni, in, in_bound_len);
#endif
if (nb < 0)
Index: VirtualBox-OSE.spec
===================================================================
RCS file: /cvs/free/rpms/VirtualBox-OSE/devel/VirtualBox-OSE.spec,v
retrieving revision 1.75
retrieving revision 1.76
diff -u -r1.75 -r1.76
--- VirtualBox-OSE.spec 5 Dec 2011 11:47:02 -0000 1.75
+++ VirtualBox-OSE.spec 11 Dec 2011 19:46:11 -0000 1.76
@@ -15,7 +15,7 @@
Name: VirtualBox-OSE
Version: 4.1.6
-Release: 5%{?prerel:.%{prerel}}%{?dist}
+Release: 6%{?prerel:.%{prerel}}%{?dist}
Summary: A general-purpose full virtualizer for PC hardware
Group: Development/Tools
@@ -42,6 +42,7 @@
Patch17: VirtualBox-OSE-4.0.0-beramono.patch
Patch18: VirtualBox-OSE-4.0.2-aiobug.patch
Patch20: VirtualBox-OSE-4.1.2-testmangle.patch
+Patch21: VirtualBox-OSE-4.1.6-kernel-3.2_compile_fixes.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
@@ -167,6 +168,7 @@
%patch17 -p1 -b .beramono
%patch18 -p1 -b .aiobug
%patch20 -p1 -b .testmangle
+%patch21 -p1 -b .kernel3.2
# Remove prebuilt binary tools
rm -rf kBuild
@@ -475,6 +477,10 @@
%changelog
+* Sun Dec 11 2011 Sérgio Basto <sergio(a)serjux.com> - 4.1.6-6
+- added compile fixes for kernel 3.2, although guest client still not start with X, now I
got a
+ segfault, but will help who want try guest client with rawhide.
+
* Mon Dec 5 2011 Sérgio Basto <sergio(a)serjux.com> - 4.1.6-5
- Now rawhide needs explicit BuildRequires libpng-devel