--- radiusd-livingston-2.1.orig/src/dbmkeys.c
+++ radiusd-livingston-2.1/src/dbmkeys.c
@@ -51,19 +51,25 @@
 
 #include	<stddef.h>
 #include	<fcntl.h>
+#include	<string.h>
+#include	<errno.h>
 
 #include	"radius.h"
 
 #ifdef NDBM
-# include	<ndbm.h>
+# ifdef BERKELEY_DB
+#  define DB_DBM_HSEARCH    1
+#  include <db.h>
+# else
+#  include	<ndbm.h>
+# endif
 #else /* not NDBM */
 # include	<dbm.h>
 #endif /* not NDBM */
 
 extern int errno;
-extern char *sys_errlist[];
 
-main(argc, argv)
+int main(argc, argv)
 int argc;
 char * argv[];
 {
@@ -80,7 +86,7 @@
 #endif /* not NDBM */
 	{
 		printf("Couldn't open DBM file error<%s>\n",
-				sys_errlist[errno]);
+				strerror(errno));
 		exit(errno);
 	}
 
