Gentoo Archives: gentoo-commits

From: Andrew Savchenko <bircoph@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: media-libs/svgalib/, media-libs/svgalib/files/
Date: Mon, 22 Feb 2016 09:03:07
Message-Id: 1456131770.d015d86919746aadcf0fb86d02548936f3f8e900.bircoph@gentoo
1 commit: d015d86919746aadcf0fb86d02548936f3f8e900
2 Author: Andrew Savchenko <bircoph <AT> gentoo <DOT> org>
3 AuthorDate: Mon Feb 22 09:00:43 2016 +0000
4 Commit: Andrew Savchenko <bircoph <AT> gentoo <DOT> org>
5 CommitDate: Mon Feb 22 09:02:50 2016 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d015d869
7
8 media-libs/svgalib: fix bug 557052
9
10 Add support for file_inode() appeared in 3.9.0.
11 In 4.0 f_dentry struct was removed, so this call is the only way
12 to go.
13
14 Patch is based on Diego Moimas proposal from bug 557052.
15
16 Package-Manager: portage-2.2.27
17 Signed-off-by: Andrew Savchenko <bircoph <AT> gentoo.org>
18
19 .../svgalib/files/svgalib-1.9.25-linux3.9.patch | 27 ++++++++++++++++++++++
20 media-libs/svgalib/svgalib-1.9.25-r4.ebuild | 3 ++-
21 2 files changed, 29 insertions(+), 1 deletion(-)
22
23 diff --git a/media-libs/svgalib/files/svgalib-1.9.25-linux3.9.patch b/media-libs/svgalib/files/svgalib-1.9.25-linux3.9.patch
24 new file mode 100644
25 index 0000000..be10e39
26 --- /dev/null
27 +++ b/media-libs/svgalib/files/svgalib-1.9.25-linux3.9.patch
28 @@ -0,0 +1,27 @@
29 +--- svgalib-1.9.25/kernel/svgalib_helper/main.c.orig 2016-02-22 11:10:25.000000000 +0300
30 ++++ svgalib-1.9.25/kernel/svgalib_helper/main.c 2016-02-22 11:17:16.223529679 +0300
31 +@@ -170,8 +170,12 @@
32 + #else
33 + static int svgalib_helper_ioctl(struct file *filp,
34 + unsigned int cmd, unsigned long arg) {
35 ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,9,0)
36 ++ struct inode *inode=file_inode(filp);
37 ++#else
38 + struct inode *inode=filp->f_dentry->d_inode;
39 + #endif
40 ++#endif
41 +
42 + io_t iov, *user_iov=(io_t *)arg;
43 + pcic_t pciv, *user_pciv=(pcic_t *)arg;
44 +@@ -586,7 +590,11 @@
45 + static int svgalib_helper_mmap(struct file *filp, struct vm_area_struct *vma) {
46 + unsigned long start=vma->vm_start;
47 + unsigned long end=vma->vm_end;
48 ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,9,0)
49 ++ unsigned long minor = my_minor(file_inode(filp)->i_rdev);
50 ++#else
51 + unsigned long minor = my_minor(filp->f_dentry->d_inode->i_rdev);
52 ++#endif
53 + #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,3,0)
54 + unsigned long ofs=vma->vm_pgoff*PAGE_SIZE;
55 + #else
56
57 diff --git a/media-libs/svgalib/svgalib-1.9.25-r4.ebuild b/media-libs/svgalib/svgalib-1.9.25-r4.ebuild
58 index 2f7f0b8..b68e30f 100644
59 --- a/media-libs/svgalib/svgalib-1.9.25-r4.ebuild
60 +++ b/media-libs/svgalib/svgalib-1.9.25-r4.ebuild
61 @@ -1,4 +1,4 @@
62 -# Copyright 1999-2012 Gentoo Foundation
63 +# Copyright 1999-2016 Gentoo Foundation
64 # Distributed under the terms of the GNU General Public License v2
65 # $Id$
66
67 @@ -37,6 +37,7 @@ src_prepare() {
68 epatch "${FILESDIR}"/${PN}-1.9.25-build2.patch
69 epatch "${FILESDIR}"/${PN}-1.9.25-qa.patch
70 epatch "${FILESDIR}"/${PN}-1.9.25-kernel3.4.patch
71 + epatch "${FILESDIR}"/${PN}-1.9.25-linux3.9.patch
72 sed -i -e '/linux\/smp_lock.h/d' kernel/svgalib_helper/main.c || die
73 }