summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2006-02-12 22:35:14 +0000
committerMike Frysinger <vapier@gentoo.org>2006-02-12 22:35:14 +0000
commitb09654e62d01425ca97281fdfde02754d351de81 (patch)
tree4d6ec9118fbb7da8fcad99c032f89c5606de6b12 /media-libs/svgalib/files
parentOops, acidentally committed wrong ebuild version. (diff)
downloadgentoo-2-b09654e62d01425ca97281fdfde02754d351de81.tar.gz
gentoo-2-b09654e62d01425ca97281fdfde02754d351de81.tar.bz2
gentoo-2-b09654e62d01425ca97281fdfde02754d351de81.zip
Fix building on 2.4 kernels #122565 by André Terpstra.
(Portage version: 2.1_pre4-r1)
Diffstat (limited to 'media-libs/svgalib/files')
-rw-r--r--media-libs/svgalib/files/svgalib-1.9.24-linux2.6.patch34
1 files changed, 34 insertions, 0 deletions
diff --git a/media-libs/svgalib/files/svgalib-1.9.24-linux2.6.patch b/media-libs/svgalib/files/svgalib-1.9.24-linux2.6.patch
index a7e18d82580d..6e07283ab646 100644
--- a/media-libs/svgalib/files/svgalib-1.9.24-linux2.6.patch
+++ b/media-libs/svgalib/files/svgalib-1.9.24-linux2.6.patch
@@ -1,6 +1,19 @@
+ - get rid of warning when linux/device.h doesnt exist
- touch up the Makefile to let the ebuild handle the module details
- fix support with io remap stuff in newer kernels
+ - dont include headers that dont exist in 2.4.x kernels
+--- svgalib/kernel/svgalib_helper/Makefile
++++ svgalib/kernel/svgalib_helper/Makefile
+@@ -28,7 +28,7 @@
+
+ endif
+
+-CLASS_SIMPLE := $(shell grep class_simple_create $(KDIR)/include/linux/device.h)
++CLASS_SIMPLE := $(shell grep class_simple_create $(KDIR)/include/linux/device.h 2>/dev/null)
+
+ ifneq ($(CLASS_SIMPLE),)
+ CLASS_CFLAGS = -DCLASS_SIMPLE=1
--- svgalib/kernel/svgalib_helper/Makefile.alt
+++ svgalib/kernel/svgalib_helper/Makefile.alt
@@ -37,7 +37,7 @@
@@ -87,3 +100,24 @@
#if (defined MINOR)
# define my_minor(x) MINOR(x)
#else
+--- svgalib/kernel/svgalib_helper/main.c
++++ svgalib/kernel/svgalib_helper/main.c
+@@ -19,13 +19,18 @@
+ #include <linux/pci.h>
+ #include <linux/devfs_fs_kernel.h>
+ #include <linux/mm.h>
++#include <linux/version.h>
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0)
+ #include <linux/thread_info.h>
++#endif
+ #include <linux/smp.h>
+ #include <linux/smp_lock.h>
+
+ #include <linux/sched.h>
+ #include <linux/wait.h>
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0)
+ #include <linux/syscalls.h>
++#endif
+
+ #define __KERNEL_SYSCALLS__
+ #include <linux/unistd.h>