diff -Naurd build-tree/apache_1.3.34.ORIG/src/modules/standard/mod_auth_db.c build-tree/apache_1.3.34/src/modules/standard/mod_auth_db.c
--- build-tree/apache_1.3.34.ORIG/src/modules/standard/mod_auth_db.c	2002-09-04 16:29:13.000000000 +0200
+++ build-tree/apache_1.3.34/src/modules/standard/mod_auth_db.c	2003-04-26 08:12:53.000000000 +0200
@@ -107,6 +107,9 @@
 #endif
 #if (DB_VERSION_MAJOR == 4)
 #define DB4
+#if (DB_VERSION_MINOR >= 1)
+#define DB4_1
+#endif
 #endif
 #endif
 
@@ -170,7 +173,10 @@
     q.data = user;
     q.size = strlen(q.data);
 
-#if defined(DB3) || defined(DB4)
+#if defined(DB4_1)
+    if (   db_create(&f, NULL, 0) != 0
+	|| f->open(f, NULL, auth_dbpwfile, NULL, DB_HASH, DB_RDONLY, 0664) != 0) {
+#elif defined(DB3) || defined(DB4)
     if (   db_create(&f, NULL, 0) != 0 
         || f->open(f, auth_dbpwfile, NULL, DB_HASH, DB_RDONLY, 0664) != 0) {
 #elif defined(DB2)
diff -Naurd build-tree/apache_1.3.34.ORIG/src/modules/standard/mod_auth_db.module build-tree/apache_1.3.34/src/modules/standard/mod_auth_db.module
--- build-tree/apache_1.3.34.ORIG/src/modules/standard/mod_auth_db.module	2001-10-16 11:12:02.000000000 +0200
+++ build-tree/apache_1.3.34/src/modules/standard/mod_auth_db.module	2003-04-26 08:46:08.000000000 +0200
@@ -3,6 +3,11 @@
     DB_VERSION=''
     DB_LIB=''
     if ./helpers/TestCompile func db_create; then
+    	DB_VERSION='Berkeley-DB/4.x'
+    elif ./helpers/TestCompile lib db; then
+        DB_VERSION='Berkeley-DB/4.x'
+	DB_LIB='-ldb'
+    elif ./helpers/TestCompile func db_create; then
         DB_VERSION='Berkeley-DB/3.x'
     elif ./helpers/TestCompile lib db db_create; then
         DB_VERSION='Berkeley-DB/3.x'
@@ -38,7 +43,7 @@
             echo "      using $DB_VERSION for mod_auth_db (-lc)"
         fi
     else
-        echo "Error: None of Berkeley-DB 1.x, 2.x or 3.x libraries found."
+        echo "Error: None of Berkeley-DB 1.x, 2.x, 3.x or 4.x libraries found."
         echo "       Either disable mod_auth_db or provide us with the paths"
         echo "       to the Berkeley-DB include and library files."
         echo "       (Hint: INCLUDES, LDFLAGS, LIBS)"
