1
0
forked from pool/virtualbox

Accepting request 196853 from Virtualization

added vbox-linux-3.11.diff to fix build (forwarded request 196852 from mseben)

OBS-URL: https://build.opensuse.org/request/show/196853
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/virtualbox?expand=0&rev=73
This commit is contained in:
Stephan Kulow 2013-09-05 21:27:31 +00:00 committed by Git OBS Bridge
commit 9b5d9bd8be
3 changed files with 71 additions and 0 deletions

63
vbox-linux-3.11.diff Normal file
View File

@ -0,0 +1,63 @@
Index: trunk/src/VBox/Additions/linux/sharedfolders/dirops.c
===================================================================
--- trunk/src/VBox/Additions/linux/sharedfolders/dirops.c
+++ trunk/src/VBox/Additions/linux/sharedfolders/dirops.c
@@ -234,5 +234,9 @@
* c. filldir returns an error (see comment on that)
*/
-static int sf_dir_read (struct file *dir, void *opaque, filldir_t filldir)
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 11, 0)
+static int sf_dir_iterate(struct file *dir, struct dir_context *ctx)
+#else
+static int sf_dir_read(struct file *dir, void *opaque, filldir_t filldir)
+#endif
{
TRACE();
@@ -258,4 +262,7 @@
LogFunc(("sf_getdent error %d\n", err));
dir->f_pos += 1;
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 11, 0)
+ ctx->pos += 1;
+#endif
continue;
}
@@ -263,5 +270,9 @@
/* d_name now contains a valid entry name */
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 11, 0)
+ sanity = ctx->pos + 0xbeef;
+#else
sanity = dir->f_pos + 0xbeef;
+#endif
fake_ino = sanity;
if (sanity - fake_ino)
@@ -271,6 +282,9 @@
}
- err = filldir(opaque, d_name, strlen(d_name),
- dir->f_pos, fake_ino, DT_UNKNOWN);
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 11, 0)
+ err = dir_emit(ctx, d_name, strlen(d_name), fake_ino, DT_UNKNOWN);
+#else
+ err = filldir(opaque, d_name, strlen(d_name), dir->f_pos, fake_ino, DT_UNKNOWN);
+#endif
if (err)
{
@@ -282,4 +296,7 @@
dir->f_pos += 1;
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 11, 0)
+ ctx->pos += 1;
+#endif
}
@@ -290,5 +307,9 @@
{
.open = sf_dir_open,
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 11, 0)
+ .iterate = sf_dir_iterate,
+#else
.readdir = sf_dir_read,
+#endif
.release = sf_dir_release,
.read = generic_read_dir

View File

@ -1,3 +1,8 @@
-------------------------------------------------------------------
Fri Aug 30 06:50:23 UTC 2013 - mseben@gmail.com
- added vbox-linux-3.11.diff to fix build (upstream patch : https://www.virtualbox.org/changeset/47588/vbox)
------------------------------------------------------------------- -------------------------------------------------------------------
Wed Jul 24 07:31:24 UTC 2013 - mseben@gmail.com Wed Jul 24 07:31:24 UTC 2013 - mseben@gmail.com

View File

@ -136,6 +136,8 @@ Patch8: vbox-python-detection.diff
Patch9: vbox-deprec-gsoap-service-proxies.diff Patch9: vbox-deprec-gsoap-service-proxies.diff
#fix failed linking process during build - this patch is just quick workaround #fix failed linking process during build - this patch is just quick workaround
Patch10: vbox-gsoapssl-deps.diff Patch10: vbox-gsoapssl-deps.diff
#fix for Linux 3.11+, upstream diff : https://www.virtualbox.org/changeset/47588/vbox
Patch11: vbox-linux-3.11.diff
#PATCH-FIX-OPENSUSE implement messagebox (VBoxPermissionMessage app), which is displayed, when user #PATCH-FIX-OPENSUSE implement messagebox (VBoxPermissionMessage app), which is displayed, when user
#try to start VirtualBox and is not memeber of vboxusers group #try to start VirtualBox and is not memeber of vboxusers group
Patch99: vbox-permissions_warning.diff Patch99: vbox-permissions_warning.diff
@ -265,6 +267,7 @@ Development file for %{name}
%patch8 -p1 %patch8 -p1
%patch9 -p1 %patch9 -p1
%patch10 -p1 %patch10 -p1
%patch11 -p1
%patch99 -p1 %patch99 -p1
%patch100 %patch100
%patch101 %patch101