[Pkg-virtualbox-commits] [virtualbox] 02/03: Fix compilation of guest additions with linux 3.11.
Felix Geyer
fgeyer at alioth.debian.org
Thu Aug 29 06:03:43 UTC 2013
This is an automated email from the git hooks/post-receive script.
fgeyer pushed a commit to branch master
in repository virtualbox.
commit 89790e23c836840886e6b6e822ba2a76089ab100
Author: Felix Geyer <fgeyer at debian.org>
Date: Sun Aug 25 12:06:57 2013 +0200
Fix compilation of guest additions with linux 3.11.
---
debian/changelog | 4 ++
debian/patches/37-linux-3.11.patch | 74 ++++++++++++++++++++++++++++++++++++
debian/patches/series | 1 +
3 files changed, 79 insertions(+)
diff --git a/debian/changelog b/debian/changelog
index e9b5c71..6b9dbaf 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -4,6 +4,10 @@ virtualbox (4.2.16-dfsg-2) UNRELEASED; urgency=low
* Add VNC plugin module.
- debian/patches/36-fix-vnc-version-string.patch: fix version string.
+ [ Felix Geyer ]
+ * Fix compilation of guest additions with linux 3.11.
+ - Add 37-linux-3.11.patch.
+
-- Felix Geyer <fgeyer at debian.org> Fri, 23 Aug 2013 23:57:37 +0200
virtualbox (4.2.16-dfsg-1) unstable; urgency=high
diff --git a/debian/patches/37-linux-3.11.patch b/debian/patches/37-linux-3.11.patch
new file mode 100644
index 0000000..f3e64a7
--- /dev/null
+++ b/debian/patches/37-linux-3.11.patch
@@ -0,0 +1,74 @@
+Description: Additions/linux/sharefolders: fix for Linux 3.11+ (thanks Azat Khuzhin)
+Origin: upstream, https://www.virtualbox.org/changeset/47588/vbox
+
+--- a/src/VBox/Additions/linux/sharedfolders/dirops.c
++++ b/src/VBox/Additions/linux/sharedfolders/dirops.c
+@@ -233,7 +233,11 @@
+ * b. failure to compute fake inode number
+ * 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();
+ for (;;)
+@@ -257,12 +261,19 @@
+ /* skip erroneous entry and proceed */
+ 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;
+ }
+
+ /* 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)
+ {
+@@ -270,8 +281,11 @@
+ return -EINVAL;
+ }
+
+- 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)
+ {
+ LogFunc(("filldir returned error %d\n", err));
+@@ -281,6 +295,9 @@
+ }
+
+ dir->f_pos += 1;
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 11, 0)
++ ctx->pos += 1;
++#endif
+ }
+
+ BUG();
+@@ -289,7 +306,11 @@
+ struct file_operations sf_dir_fops =
+ {
+ .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
+ #if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 37)
diff --git a/debian/patches/series b/debian/patches/series
index 3627f35..c1924d2 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -14,3 +14,4 @@
32-disable-guest-version-check.patch
35-libvdeplug-soname.patch
36-fix-vnc-version-string.patch
+37-linux-3.11.patch
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-virtualbox/virtualbox.git
More information about the Pkg-virtualbox-commits
mailing list