summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2006-01-04 01:49:46 +0000
committerMike Frysinger <vapier@gentoo.org>2006-01-04 01:49:46 +0000
commit1a36e4d58b6affe9df3c6608e0fc91d04c411ea1 (patch)
treeaa622cff89d2ef04bac9fd6d0bd00d0e9500bf42 /media-libs/svgalib/files
parentfixed duplication in code in mozcoreconf (diff)
downloadgentoo-2-1a36e4d58b6affe9df3c6608e0fc91d04c411ea1.tar.gz
gentoo-2-1a36e4d58b6affe9df3c6608e0fc91d04c411ea1.tar.bz2
gentoo-2-1a36e4d58b6affe9df3c6608e0fc91d04c411ea1.zip
Fix by Aquila for building with linux-2.6.15 #115316 by Martin Mokrejs.
(Portage version: 2.1_pre3-r1)
Diffstat (limited to 'media-libs/svgalib/files')
-rw-r--r--media-libs/svgalib/files/svgalib-1.9.21-linux2.6.patch43
1 files changed, 43 insertions, 0 deletions
diff --git a/media-libs/svgalib/files/svgalib-1.9.21-linux2.6.patch b/media-libs/svgalib/files/svgalib-1.9.21-linux2.6.patch
index 48d769116c4f..d1a34a028e74 100644
--- a/media-libs/svgalib/files/svgalib-1.9.21-linux2.6.patch
+++ b/media-libs/svgalib/files/svgalib-1.9.21-linux2.6.patch
@@ -58,3 +58,46 @@
# define pci_present() 1
+@@ -84,6 +84,21 @@
+ # define SLH_SYSFS_REGISTER \
+ svgalib_helper_class = class_create(THIS_MODULE, "svgalib_helper");
+
++
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,15)
++
++# define SLH_SYSFS_ADD_CONTROL \
++ class_device_create(svgalib_helper_class, NULL, \
++ MKDEV(SVGALIB_HELPER_MAJOR, 0), \
++ NULL, "svga");
++
++# define SLH_SYSFS_ADD_DEVICE(_name, _minor) \
++ class_device_create(svgalib_helper_class, NULL, \
++ MKDEV(SVGALIB_HELPER_MAJOR, _minor), \
++ &sh_pci_devs[_minor]->dev->dev, _name);
++#else
++
++
+ # define SLH_SYSFS_ADD_CONTROL \
+ class_device_create(svgalib_helper_class, \
+ MKDEV(SVGALIB_HELPER_MAJOR, 0), \
+@@ -93,6 +108,8 @@
+ class_device_create(svgalib_helper_class, \
+ MKDEV(SVGALIB_HELPER_MAJOR, _minor), \
+ &sh_pci_devs[_minor]->dev->dev, _name);
++#endif
++
+
+ # define SLH_SYSFS_REMOVE_DEVICE(i) \
+ class_destroy(svgalib_helper_class);
+@@ -148,6 +148,11 @@
+ # define SLH_SYSFS_UNREGISTER
+ #endif
+
++/* gregkh was so kind as to remove a ton of PCI defines in linux-2.6.15 */
++#if !defined(PCI_VENDOR_ID_RENDITION)
++# define PCI_VENDOR_ID_RENDITION 0x1163
++#endif
++
+ #if (defined MINOR)
+ # define my_minor(x) MINOR(x)
+ #else