summaryrefslogtreecommitdiff
path: root/media-libs/svgalib/files/svgalib-1.9.25-linux_3.9.patch
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
committerV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
commit4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch)
treeba5f07bf3f9d22d82e54a462313f5d244036c768 /media-libs/svgalib/files/svgalib-1.9.25-linux_3.9.patch
reinit the tree, so we can have metadata
Diffstat (limited to 'media-libs/svgalib/files/svgalib-1.9.25-linux_3.9.patch')
-rw-r--r--media-libs/svgalib/files/svgalib-1.9.25-linux_3.9.patch27
1 files changed, 27 insertions, 0 deletions
diff --git a/media-libs/svgalib/files/svgalib-1.9.25-linux_3.9.patch b/media-libs/svgalib/files/svgalib-1.9.25-linux_3.9.patch
new file mode 100644
index 000000000000..be10e394707a
--- /dev/null
+++ b/media-libs/svgalib/files/svgalib-1.9.25-linux_3.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