From: "Andrew Savchenko" <bircoph@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: media-libs/svgalib/, media-libs/svgalib/files/
Date: Mon, 22 Feb 2016 09:03:00 +0000 (UTC) [thread overview]
Message-ID: <1456131770.d015d86919746aadcf0fb86d02548936f3f8e900.bircoph@gentoo> (raw)
commit: d015d86919746aadcf0fb86d02548936f3f8e900
Author: Andrew Savchenko <bircoph <AT> gentoo <DOT> org>
AuthorDate: Mon Feb 22 09:00:43 2016 +0000
Commit: Andrew Savchenko <bircoph <AT> gentoo <DOT> org>
CommitDate: Mon Feb 22 09:02:50 2016 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d015d869
media-libs/svgalib: fix bug 557052
Add support for file_inode() appeared in 3.9.0.
In 4.0 f_dentry struct was removed, so this call is the only way
to go.
Patch is based on Diego Moimas proposal from bug 557052.
Package-Manager: portage-2.2.27
Signed-off-by: Andrew Savchenko <bircoph <AT> gentoo.org>
.../svgalib/files/svgalib-1.9.25-linux3.9.patch | 27 ++++++++++++++++++++++
media-libs/svgalib/svgalib-1.9.25-r4.ebuild | 3 ++-
2 files changed, 29 insertions(+), 1 deletion(-)
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
new file mode 100644
index 0000000..be10e39
--- /dev/null
+++ b/media-libs/svgalib/files/svgalib-1.9.25-linux3.9.patch
@@ -0,0 +1,27 @@
+--- svgalib-1.9.25/kernel/svgalib_helper/main.c.orig 2016-02-22 11:10:25.000000000 +0300
++++ svgalib-1.9.25/kernel/svgalib_helper/main.c 2016-02-22 11:17:16.223529679 +0300
+@@ -170,8 +170,12 @@
+ #else
+ static int svgalib_helper_ioctl(struct file *filp,
+ unsigned int cmd, unsigned long arg) {
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,9,0)
++ struct inode *inode=file_inode(filp);
++#else
+ struct inode *inode=filp->f_dentry->d_inode;
+ #endif
++#endif
+
+ io_t iov, *user_iov=(io_t *)arg;
+ pcic_t pciv, *user_pciv=(pcic_t *)arg;
+@@ -586,7 +590,11 @@
+ static int svgalib_helper_mmap(struct file *filp, struct vm_area_struct *vma) {
+ unsigned long start=vma->vm_start;
+ unsigned long end=vma->vm_end;
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,9,0)
++ unsigned long minor = my_minor(file_inode(filp)->i_rdev);
++#else
+ unsigned long minor = my_minor(filp->f_dentry->d_inode->i_rdev);
++#endif
+ #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,3,0)
+ unsigned long ofs=vma->vm_pgoff*PAGE_SIZE;
+ #else
diff --git a/media-libs/svgalib/svgalib-1.9.25-r4.ebuild b/media-libs/svgalib/svgalib-1.9.25-r4.ebuild
index 2f7f0b8..b68e30f 100644
--- a/media-libs/svgalib/svgalib-1.9.25-r4.ebuild
+++ b/media-libs/svgalib/svgalib-1.9.25-r4.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2012 Gentoo Foundation
+# Copyright 1999-2016 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$
@@ -37,6 +37,7 @@ src_prepare() {
epatch "${FILESDIR}"/${PN}-1.9.25-build2.patch
epatch "${FILESDIR}"/${PN}-1.9.25-qa.patch
epatch "${FILESDIR}"/${PN}-1.9.25-kernel3.4.patch
+ epatch "${FILESDIR}"/${PN}-1.9.25-linux3.9.patch
sed -i -e '/linux\/smp_lock.h/d' kernel/svgalib_helper/main.c || die
}
next reply other threads:[~2016-02-22 9:03 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-02-22 9:03 Andrew Savchenko [this message]
-- strict thread matches above, loose matches on Subject: below --
2016-02-22 12:08 [gentoo-commits] repo/gentoo:master commit in: media-libs/svgalib/, media-libs/svgalib/files/ Andrew Savchenko
2021-04-21 13:03 Andrew Savchenko
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1456131770.d015d86919746aadcf0fb86d02548936f3f8e900.bircoph@gentoo \
--to=bircoph@gentoo.org \
--cc=gentoo-commits@lists.gentoo.org \
--cc=gentoo-dev@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox