mtd/fs/jffs2 rbtree.c,1.2,1.3

David Woodhouse dwmw2 at infradead.org
Thu Oct 16 04:02:21 EDT 2003


Update of /home/cvs/mtd/fs/jffs2
In directory phoenix.infradead.org:/tmp/cvs-serv29456

Modified Files:
	rbtree.c 
Log Message:
Provide rbtree code on kernels which didn't export it, when built as module


Index: rbtree.c
===================================================================
RCS file: /home/cvs/mtd/fs/jffs2/rbtree.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- rbtree.c	15 Nov 2002 13:18:04 -0000	1.2
+++ rbtree.c	16 Oct 2003 08:02:19 -0000	1.3
@@ -20,19 +20,16 @@
   $Id$
 */
 
-/* NOTE -- This file is _not_ under the eCos licence, it is pure GPL.
-   For use in eCos a reimplementation of Red/Black trees will be 
-   necessary.
-*/
-
-#ifdef __ECOS
-#error "Licence problem. Remove this #error if you will comply with GPL."
+#ifdef __ECOS /* This file is _not_ under the eCos licence; it is pure GPL. */
+#error "Licence problem. eCos has its own rbtree code."
 #endif
 
 #include <linux/version.h>
 #include <linux/rbtree.h>
 
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,4,11)
+/* This wasn't present till 2.4.11, wasn't exported till 2.4.19 */
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,4,11) || \
+   (LINUX_VERSION_CODE < KERNEL_VERSION(2,4,19) && defined(MODULE))
 static void __rb_rotate_left(struct rb_node * node, struct rb_root * root)
 {
 	struct rb_node * right = node->rb_right;




More information about the linux-mtd-cvs mailing list