diff --git a/include/avl.h b/include/avl.h
index 16cea00f5be2e32e3b0606cca4d7fe24576e0de2..60d535c3f491e9ba2bd145ce2202a19066bf3f9e 100644
--- a/include/avl.h
+++ b/include/avl.h
@@ -38,7 +38,6 @@ LDAP_BEGIN_DECL
 
 typedef struct avlnode Avlnode;
 
-#ifdef AVL_INTERNAL
 struct avlnode {
 	void*		avl_data;
 	signed int		avl_bf;
@@ -46,6 +45,8 @@ struct avlnode {
 	struct avlnode	*avl_right;
 };
 
+#ifdef AVL_INTERNAL
+
 #define NULLAVL	((Avlnode *) NULL)
 
 /* balance factor values */
@@ -76,6 +77,9 @@ avl_delete LDAP_P((Avlnode **, void*, AVL_CMP));
 LDAP_AVL_F( void* )
 avl_find LDAP_P((Avlnode *, const void*, AVL_CMP));
 
+LDAP_AVL_F( Avlnode* )
+avl_find2 LDAP_P((Avlnode *, const void*, AVL_CMP));
+
 LDAP_AVL_F( void* )
 avl_find_lin LDAP_P((Avlnode *, const void*, AVL_CMP));
 
diff --git a/libraries/liblutil/avl.c b/libraries/liblutil/avl.c
index 29dafee02a1c844b97e488e2d94c0124592a1263..37f1da5bd163c6584661113c9c42a1a106f1e886 100644
--- a/libraries/liblutil/avl.c
+++ b/libraries/liblutil/avl.c
@@ -644,8 +644,8 @@ avl_free( Avlnode *root, AVL_FREE dfree )
  * < 0 if arg1 is less than arg2 and > 0 if arg1 is greater than arg2.
  */
 
-void*
-avl_find( Avlnode *root, const void* data, AVL_CMP fcmp )
+Avlnode *
+avl_find2( Avlnode *root, const void *data, AVL_CMP fcmp )
 {
 	int	cmp;
 
@@ -655,6 +655,13 @@ avl_find( Avlnode *root, const void* data, AVL_CMP fcmp )
 		else
 			root = root->avl_right;
 	}
+	return root;
+}
+
+void*
+avl_find( Avlnode *root, const void* data, AVL_CMP fcmp )
+{
+	root = avl_find2( root, data, fcmp );
 
 	return( root ? root->avl_data : 0 );
 }