summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2006-01-14 00:24:21 +0000
committerMike Frysinger <vapier@gentoo.org>2006-01-14 00:24:21 +0000
commitc99057068b70570db75aa9aa128ce93e072a3fc3 (patch)
treeb2ac45d77b748b94d3c4dbc19bb5531b95231b7b /sys-apps
parentold (diff)
downloadgentoo-2-c99057068b70570db75aa9aa128ce93e072a3fc3.tar.gz
gentoo-2-c99057068b70570db75aa9aa128ce93e072a3fc3.tar.bz2
gentoo-2-c99057068b70570db75aa9aa128ce93e072a3fc3.zip
Fix by Andreas Sundebo for building with linux-2.6.15 #118395 by playmiac.
(Portage version: 2.1_pre3-r1)
Diffstat (limited to 'sys-apps')
-rw-r--r--sys-apps/rlocate/ChangeLog8
-rw-r--r--sys-apps/rlocate/files/rlocate-0.3.3-linux-2.6.15.patch60
-rw-r--r--sys-apps/rlocate/rlocate-0.3.3.ebuild5
3 files changed, 69 insertions, 4 deletions
diff --git a/sys-apps/rlocate/ChangeLog b/sys-apps/rlocate/ChangeLog
index 541a48a24f7f..43c1dd259479 100644
--- a/sys-apps/rlocate/ChangeLog
+++ b/sys-apps/rlocate/ChangeLog
@@ -1,6 +1,10 @@
# ChangeLog for sys-apps/rlocate
-# Copyright 1999-2005 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sys-apps/rlocate/ChangeLog,v 1.7 2005/12/19 23:38:11 vapier Exp $
+# Copyright 1999-2006 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/sys-apps/rlocate/ChangeLog,v 1.8 2006/01/14 00:24:21 vapier Exp $
+
+ 14 Jan 2006; Mike Frysinger <vapier@gentoo.org>
+ +files/rlocate-0.3.3-linux-2.6.15.patch, rlocate-0.3.3.ebuild:
+ Fix by Andreas Sundebo for building with linux-2.6.15 #118395 by playmiac.
*rlocate-0.3.3 (19 Dec 2005)
diff --git a/sys-apps/rlocate/files/rlocate-0.3.3-linux-2.6.15.patch b/sys-apps/rlocate/files/rlocate-0.3.3-linux-2.6.15.patch
new file mode 100644
index 000000000000..5bb935b65e79
--- /dev/null
+++ b/sys-apps/rlocate/files/rlocate-0.3.3-linux-2.6.15.patch
@@ -0,0 +1,60 @@
+http://bugs.gentoo.org/118395
+
+--- rlocate-module/rlocate.c
++++ rlocate-module/rlocate.c
+@@ -60,6 +60,9 @@
+ #else
+ static struct class *rlocate_class;
+ #endif
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,15)
++static struct rw_semaphore namespace_sem;
++#endif
+
+ MODULE_AUTHOR("Rasto Levrinc");
+ MODULE_DESCRIPTION("rlocate");
+@@ -680,7 +681,11 @@
+ ret = PTR_ERR(rlocate_class);
+ goto no_simple_class;
+ }
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,15)
++ class_device_create(rlocate_class, NULL, MKDEV(Major, 0), NULL,
++#else
+ class_device_create(rlocate_class, MKDEV(Major, 0), NULL,
++#endif
+ DEVICE_NAME);
+ // devfs
+ devfs_mk_cdev(MKDEV(Major, 0), S_IFCHR|S_IRUSR|S_IWUSR, DEVICE_NAME);
+@@ -835,7 +836,11 @@
+ }
+ return;
+ }
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,15)
++ down_read(&namespace_sem);
++#else
+ down_read(&namespace->sem);
++#endif
+ list_for_each(head, &namespace->list) {
+ mnt = list_entry(head, struct vfsmount, mnt_list);
+ if (mnt->mnt_root == sb_root) {
+@@ -848,7 +849,11 @@
+ }
+ }
+ }
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,15)
++ up_read(&namespace_sem);
++#else
+ up_read(&namespace->sem);
++#endif
+ dput(sb_root);
+ }
+
+@@ -930,6 +931,9 @@
+ static int __init init_rlocate(void)
+ {
+ int ret;
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,15)
++ init_rwsem(&namespace_sem);
++#endif
+ printk(KERN_INFO "rlocate version "RL_VERSION"\n");
+ //init_waitqueue_head (&filenames_wq);
+ // register dev
diff --git a/sys-apps/rlocate/rlocate-0.3.3.ebuild b/sys-apps/rlocate/rlocate-0.3.3.ebuild
index bc41a8dda1ce..1e9ce528bbfe 100644
--- a/sys-apps/rlocate/rlocate-0.3.3.ebuild
+++ b/sys-apps/rlocate/rlocate-0.3.3.ebuild
@@ -1,6 +1,6 @@
-# Copyright 1999-2005 Gentoo Foundation
+# Copyright 1999-2006 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sys-apps/rlocate/rlocate-0.3.3.ebuild,v 1.2 2005/12/20 23:44:30 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-apps/rlocate/rlocate-0.3.3.ebuild,v 1.3 2006/01/14 00:24:21 vapier Exp $
inherit eutils linux-mod
@@ -29,6 +29,7 @@ src_unpack() {
unpack ${A}
cd "${S}"
epatch "${FILESDIR}"/${P}-build.patch
+ epatch "${FILESDIR}"/${P}-linux-2.6.15.patch
}
src_compile() {